slight init refactor
Removing argv removes the need to pass the arrays arround. Better to just reference them directly.
This commit is contained in:
parent
41c4ce7718
commit
a0706e0f46
1 changed files with 4 additions and 6 deletions
10
init.zsh
10
init.zsh
|
@ -27,7 +27,7 @@ load_zim_function() {
|
||||||
local mod_function
|
local mod_function
|
||||||
|
|
||||||
# autoload searches fpath for function locations; add enabled module function paths
|
# 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 {
|
function {
|
||||||
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
||||||
|
@ -38,11 +38,9 @@ load_zim_function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load zim functions
|
# initialize zim modules
|
||||||
load_zim_function ${zmodules[@]}
|
load_zim_function
|
||||||
|
load_zim_module
|
||||||
# Load zim modules
|
|
||||||
load_zim_module ${zmodules[@]}
|
|
||||||
|
|
||||||
unset zmodules
|
unset zmodules
|
||||||
unfunction load_zim_{module,function}
|
unfunction load_zim_{module,function}
|
||||||
|
|
Loading…
Reference in a new issue