1
0
Fork 0
mirror of synced 2024-05-28 04:51:11 -04:00
zimfw/src/stage2/29_zimfw_build_init.zsh.erb
Eric Nielsen e097e6bf71
Add list action, don't run tool on external module
Using the `list` action with `-v` shows all current details for the
existing modules.
Don't try to install or update external modules, since they have an
absolute path instead of a valid URL.
2021-09-19 13:37:13 -05:00

15 lines
538 B
Plaintext

_zimfw_build_init() {
local -r ztarget=${ZIM_HOME}/init.zsh
# Force update of init.zsh if it's older than .zimrc
if [[ ${ztarget} -ot <%= home %>/.zimrc ]]; then
command mv -f ${ztarget}{,.old} || return 1
fi
_zimfw_mv =(
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
local -r zpre=$'*\0'
if (( ${#_zfpaths} )) print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'
if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions#${~zpre}}
print -R ${(F)_zcmds#${~zpre}}
) ${ztarget}
}