Browse Source

[Fix #167] Use an anononymous function for $fpath

master
Sorin Ionescu 13 years ago
parent
commit
af983e9788
  1. 10
      helper.zsh

10
helper.zsh

@ -33,10 +33,12 @@ function autoloadable { @@ -33,10 +33,12 @@ function autoloadable {
# Loads Oh My Zsh modules.
function omodload {
local omodule
function {
local ofunction
# Extended globbing is needed for autoloading of module functions.
setopt EXTENDED_GLOB
# Extended globbing is needed for listing autoloadable function directories.
setopt LOCAL_OPTIONS EXTENDED_GLOB
# Add functions to fpath.
fpath=(${argv:+${OMZ}/modules/${^argv}/functions(/FN)} $fpath)
@ -47,9 +49,7 @@ function omodload { @@ -47,9 +49,7 @@ function omodload {
do
autoload -Uz "$ofunction"
done
# Extended globbing is no longer needed.
unsetopt EXTENDED_GLOB
} "$argv[@]"
for omodule in "$argv[@]"; do
if zstyle -t ":omz:module:$omodule" loaded; then

Loading…
Cancel
Save