mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-23 03:27:59 +00:00
[Fix #167] Use an anononymous function for $fpath
This commit is contained in:
parent
e79fc7a1aa
commit
af983e9788
10
helper.zsh
10
helper.zsh
@ -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…
Reference in New Issue
Block a user