1
0
Fork 0
mirror of synced 2024-11-22 15:25:34 -05:00

slight init refactor

Removing argv removes the need to pass the arrays arround. Better to
just reference them directly.
This commit is contained in:
Matt Hamilton 2015-12-30 10:14:10 -05:00
parent 41c4ce7718
commit a0706e0f46

View file

@ -27,7 +27,7 @@ load_zim_function() {
local mod_function
# autoload searches fpath for function locations; add enabled module function paths
fpath=(${argv:+${ZIM}/modules/${^zmodules}/functions(/FN)} ${fpath})
fpath=(${${zmodules}:+${ZIM}/modules/${^zmodules}/functions(/FN)} ${fpath})
function {
setopt LOCAL_OPTIONS EXTENDED_GLOB
@ -38,11 +38,9 @@ load_zim_function() {
}
}
# Load zim functions
load_zim_function ${zmodules[@]}
# Load zim modules
load_zim_module ${zmodules[@]}
# initialize zim modules
load_zim_function
load_zim_module
unset zmodules
unfunction load_zim_{module,function}