setup fpath in one go
This commit is contained in:
parent
302759f82c
commit
096ae2c87d
2 changed files with 4 additions and 3 deletions
|
@ -38,6 +38,9 @@ function omodload {
|
||||||
# $argv is overridden in the anonymous function.
|
# $argv is overridden in the anonymous function.
|
||||||
omodules=("$argv[@]")
|
omodules=("$argv[@]")
|
||||||
|
|
||||||
|
# Add functions to fpath.
|
||||||
|
fpath=(${OMZ}/modules/${^omodules}/functions(/FN) $fpath)
|
||||||
|
|
||||||
for omodule in "$omodules[@]"; do
|
for omodule in "$omodules[@]"; do
|
||||||
if zstyle -t ":omz:module:$omodule" loaded; then
|
if zstyle -t ":omz:module:$omodule" loaded; then
|
||||||
continue
|
continue
|
||||||
|
@ -46,8 +49,6 @@ function omodload {
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
if [[ -s "$OMZ/modules/$omodule/init.zsh" ]]; then
|
if [[ -s "$OMZ/modules/$omodule/init.zsh" ]]; then
|
||||||
# Add functions to fpath.
|
|
||||||
fpath=(${OMZ}/modules/${^omodule}/functions(/FN) $fpath)
|
|
||||||
source "$OMZ/modules/$omodule/init.zsh"
|
source "$OMZ/modules/$omodule/init.zsh"
|
||||||
fi
|
fi
|
||||||
if (( $? == 0 )); then
|
if (( $? == 0 )); then
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8b89dd9d10e86313f49fafdf88e8540f97346f33
|
Subproject commit 39e26ca01fabcaa6f20d4638f56f9866a82f2b1f
|
Loading…
Add table
Reference in a new issue