aade4704b1
So we can have the following code in the zlogin template: source ${ZIM_HOME}/login_init.zsh -q &! instead of depending on the zimfw function there. This allows fixing the issue were a non-interactive login shell currently yields: command not found: zimfw. To fully fix the issue, we also need a new zshenv template containing: ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim Templates will be updated in the install script.
14 lines
515 B
Plaintext
14 lines
515 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}/<%= script_filename %> \"\${@}\" }"
|
|
(( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:P}' ${fpath})'
|
|
(( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions}
|
|
print -Rn ${(F):-source ${^_zscripts:P}}
|
|
) ${ztarget}
|
|
}
|