dfbe535430
as we do for init.zsh, so behavior is symmetric. This guarantees that both init.zsh and login_init.zsh will always have newer timestamps than .zimrc after a build.
14 lines
574 B
Plaintext
14 lines
574 B
Plaintext
_zimfw_build_login_init() {
|
|
# Array with unique dirs. ${ZIM_HOME} or any subdirectory should only occur once.
|
|
local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
|
|
local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)")
|
|
local -r ztarget=${ZIM_HOME}/login_init.zsh
|
|
# Force update of login_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 -Rn "<%= render_escaped("src/templates/login_init.zsh.erb") %>"
|
|
) ${ztarget}
|
|
}
|