1
0
Fork 0
mirror of synced 2024-06-01 14:51:11 -04:00
zimfw/src/stage2/69_zimfw_run_list.zsh.erb
Eric Nielsen 5bcfb8cc9f
Override repository options along zmodule calls
for the same module name. Other minor fixes:
* Show skipping already installed modules with install action and `-v`.
* Consider external module dirs when calling compile action directly, by
  making sure _zimfw_source_zimrc is called first.
* Ignore return value from `zargs` with `-P`, as it's oddly returning
  123 since Zsh 5.9. Maybe related to these changes:
  67f932e7c5
2022-05-17 18:43:59 -05:00

29 lines
1.2 KiB
Plaintext

_zimfw_run_list() {
local -r zname=${1}
print -PnR "%B${zname}:%b ${_zdirs[${zname}]}"
if [[ -z ${_zurls[${zname}]} ]] print -Pn ' (external)'
if (( ${_zfrozens[${zname}]} )) print -Pn ' (frozen)'
if (( ${_zdisableds[${zname}]} )) print -Pn ' (disabled)'
print
if (( _zprintlevel > 1 )); then
if [[ ${_zfrozens[${zname}]} -eq 0 && -n ${_zurls[${zname}]} ]]; then
print -nR " From: ${_zurls[${zname}]}, "
if [[ -z ${_zrevs[${zname}]} ]]; then
print -n 'default branch'
else
print -nR "${_ztypes[${zname}]} ${_zrevs[${zname}]}"
fi
print -nR ", using ${_ztools[${zname}]}"
if (( ! _zsubmodules[${zname}] )) print -nR ', no git submodules'
print
if [[ -n ${_zonpulls[${zname}]} ]] print -R " On-pull: ${_zonpulls[${zname}]}"
fi
# Match and remove the current module prefix from _zfpaths, _zfunctions and _zcmds
local -r zpre=${zname}$'\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
}