Don't autoload zimfw if no config file exists
instead of if no ${ZIM_HOME} exists. If current user has no config file, then most likely they're sourcing the init.zsh generated by another user in the same machine.
This commit is contained in:
parent
6166fce1a1
commit
7f3491b1bb
2 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ _zimfw_build_init() {
|
|||
command mv -f ${ztarget}{,.old} || return 1
|
||||
fi
|
||||
_zimfw_mv =(
|
||||
print -R 'if (( ${+ZIM_HOME} )) zimfw() { source '${${(qqq)__ZIMFW_FILE}/${HOME}/\${HOME}}' "${@}" }'
|
||||
print -R 'if [[ -e ${ZIM_CONFIG_FILE:-<%= home %>/.zimrc} ]] zimfw() { source '${${(qqq)__ZIMFW_FILE}/${HOME}/\${HOME}}' "${@}" }'
|
||||
local zroot_dir zpre
|
||||
local -a zif_functions zif_cmds zroot_functions zroot_cmds
|
||||
local -a zfunctions=(${_zfunctions}) zcmds=(${_zcmds})
|
||||
|
|
|
@ -61,7 +61,7 @@ _zimfw_build_init() {
|
|||
command mv -f ${ztarget}{,.old} || return 1
|
||||
fi
|
||||
_zimfw_mv =(
|
||||
print -R 'if (( ${+ZIM_HOME} )) zimfw() { source '${${(qqq)__ZIMFW_FILE}/${HOME}/\${HOME}}' "${@}" }'
|
||||
print -R 'if [[ -e ${ZIM_CONFIG_FILE:-${ZDOTDIR:-${HOME}}/.zimrc} ]] zimfw() { source '${${(qqq)__ZIMFW_FILE}/${HOME}/\${HOME}}' "${@}" }'
|
||||
local zroot_dir zpre
|
||||
local -a zif_functions zif_cmds zroot_functions zroot_cmds
|
||||
local -a zfunctions=(${_zfunctions}) zcmds=(${_zcmds})
|
||||
|
@ -462,7 +462,7 @@ _zimfw_compile() {
|
|||
}
|
||||
|
||||
_zimfw_info() {
|
||||
print -R 'zimfw version: '${_zversion}' (built at 2024-06-25 17:29:35 UTC, previous commit is 3b7908d)'
|
||||
print -R 'zimfw version: '${_zversion}' (built at 2024-06-25 18:20:18 UTC, previous commit is 6166fce)'
|
||||
local zparam
|
||||
for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZIM_HOME ZSH_VERSION; do
|
||||
print -R ${(r.22....:.)zparam}${(P)zparam}
|
||||
|
|
Loading…
Reference in a new issue