1
0
Fork 0

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

pull/173/head
Sorin Ionescu 13 years ago
parent e79fc7a1aa
commit af983e9788

@ -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 {
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