2019-12-14 22:21:34 -05:00
|
|
|
_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 =(
|
2020-01-02 13:05:53 -05:00
|
|
|
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
2021-09-20 22:14:12 -04:00
|
|
|
print -R "zmodule() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
2021-09-21 09:27:56 -04:00
|
|
|
# Remove all prefixes from _zfpaths, _zfunctions and _zcmds
|
2021-09-19 14:37:13 -04:00
|
|
|
local -r zpre=$'*\0'
|
|
|
|
if (( ${#_zfpaths} )) print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'
|
2021-09-29 22:22:28 -04:00
|
|
|
if (( ${#_zfunctions} )) print -R 'autoload -Uz -- '${_zfunctions#${~zpre}}
|
2021-09-19 14:37:13 -04:00
|
|
|
print -R ${(F)_zcmds#${~zpre}}
|
2019-12-14 22:21:34 -05:00
|
|
|
) ${ztarget}
|
|
|
|
}
|