1
0
Fork 0
mirror of synced 2024-05-27 20:41:11 -04:00
zimfw/src/stage2/69_zimfw_run_list.zsh.erb
Eric Nielsen 811616cc60
Add missing -l in git tool print_okay
This fixes a regression introduced in commit b1edcf34d0.

Also don't use any option after `-R` just to be safe. The zshbuiltins(1)
manual states:

> Only the -e and -n flags are recognized after -R; all other arguments
> and options are printed.
2021-11-08 11:38:56 -05:00

27 lines
1 KiB
Plaintext

_zimfw_run_list() {
local -r ztool=${1} zmodule=${3} zdir=${4} zurl=${5} ztype=${6} zrev=${7}
local -ri zfrozen=${8} zdisabled=${9}
print -PnR "%B${zmodule}:%b ${zdir}"
if [[ -z ${zurl} ]] print -Pn ' (external)'
if (( ${zfrozen} )) print -Pn ' (frozen)'
if (( ${zdisabled} )) print -Pn ' (disabled)'
print
if (( _zprintlevel > 1 )); then
if [[ ${zfrozen} -eq 0 && -n ${zurl} ]]; then
print -nR " From: ${zurl}, "
if [[ -z ${zrev} ]]; then
print -n 'default branch'
else
print -nR "${ztype} ${zrev}"
fi
print -R ", using ${ztool}"
fi
# Match and remove the current module prefix from _zfpaths, _zfunctions and _zcmds
local -r zpre=${zmodule}$'\0'
local -r zfpaths=(${${(M)_zfpaths:#${zpre}*}#${zpre}}) zfunctions=(${${(M)_zfunctions:#${zpre}*}#${zpre}}) zcmds=(${${(M)_zcmds:#${zpre}*}#${zpre}})
if (( ${#zfpaths} )) print -R " fpath: ${zfpaths[@]}"
if (( ${#zfunctions} )) print -R " autoload: ${zfunctions[@]}"
if (( ${#zcmds} )) print -R " cmd: ${(j:; :)zcmds[@]}"
fi
}