From 096ae2c87d165aa9fd5e39ca3ffdc55fab59e71b Mon Sep 17 00:00:00 2001 From: Ben O'Hara Date: Mon, 18 Jun 2012 16:58:36 +1000 Subject: [PATCH] setup fpath in one go --- helper.zsh | 5 +++-- modules/completion/functions | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/helper.zsh b/helper.zsh index 31f1d0b3..7be8a1ad 100644 --- a/helper.zsh +++ b/helper.zsh @@ -38,6 +38,9 @@ function omodload { # $argv is overridden in the anonymous function. omodules=("$argv[@]") + # Add functions to fpath. + fpath=(${OMZ}/modules/${^omodules}/functions(/FN) $fpath) + for omodule in "$omodules[@]"; do if zstyle -t ":omz:module:$omodule" loaded; then continue @@ -46,8 +49,6 @@ function omodload { continue else 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" fi if (( $? == 0 )); then diff --git a/modules/completion/functions b/modules/completion/functions index 8b89dd9d..39e26ca0 160000 --- a/modules/completion/functions +++ b/modules/completion/functions @@ -1 +1 @@ -Subproject commit 8b89dd9d10e86313f49fafdf88e8540f97346f33 +Subproject commit 39e26ca01fabcaa6f20d4638f56f9866a82f2b1f