And also simplify functions glob in init.zsh
to match the change done in `login_init.zsh`. Also call autoloaded function only when autoload succeeded.
This commit is contained in:
parent
78e6d1fc91
commit
13eb86d4c8
1 changed files with 2 additions and 3 deletions
5
init.zsh
5
init.zsh
|
@ -2,8 +2,7 @@
|
|||
# Zim initializition
|
||||
#
|
||||
|
||||
autoload -Uz is-at-least
|
||||
if ! is-at-least 5.2; then
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.2; then
|
||||
print "ERROR: Zim didn't start. You're using zsh version ${ZSH_VERSION}, and versions < 5.2 are not supported. Update your zsh." >&2
|
||||
return 1
|
||||
fi
|
||||
|
@ -22,7 +21,7 @@ fi
|
|||
# autoload searches fpath for function locations; add enabled module function paths
|
||||
fpath=(${ZIM_HOME}/modules/${^zmodules}/functions(/FN) ${fpath})
|
||||
|
||||
for mod_function in ${ZIM_HOME}/modules/${^zmodules}/functions/^([_.]*|prompt_*_setup|README*|*.zwc|*.zwc.old)(-.N:t); do
|
||||
for mod_function in ${ZIM_HOME}/modules/${^zmodules}/functions/^(_*|prompt_*_setup|*.*)(-.N:t); do
|
||||
autoload -Uz ${mod_function}
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue