1
0
Fork 0
mirror of synced 2024-11-26 09:15:34 -05:00

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:
Eric Nielsen 2018-04-09 18:20:54 -05:00
parent 78e6d1fc91
commit 13eb86d4c8

View file

@ -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
}