|
|
@ -38,23 +38,9 @@ function omodload {
|
|
|
|
# $argv is overridden in the anonymous function.
|
|
|
|
# $argv is overridden in the anonymous function.
|
|
|
|
omodules=("$argv[@]")
|
|
|
|
omodules=("$argv[@]")
|
|
|
|
|
|
|
|
|
|
|
|
function {
|
|
|
|
|
|
|
|
local ofunction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Extended globbing is needed for listing autoloadable function directories.
|
|
|
|
# Extended globbing is needed for listing autoloadable function directories.
|
|
|
|
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
|
|
|
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
|
|
|
|
|
|
|
|
|
|
|
# Add functions to fpath.
|
|
|
|
|
|
|
|
fpath=(${omodules:+${OMZ}/modules/${^omodules}/functions(/FN)} $fpath)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Load Oh My Zsh functions.
|
|
|
|
|
|
|
|
for ofunction in \
|
|
|
|
|
|
|
|
$OMZ/modules/${^omodules}/functions/^([_.]*|prompt_*_setup|README*)(.N:t)
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
autoload -Uz "$ofunction"
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
@ -68,6 +54,15 @@ function omodload {
|
|
|
|
|
|
|
|
|
|
|
|
if (( $? == 0 )); then
|
|
|
|
if (( $? == 0 )); then
|
|
|
|
zstyle ":omz:module:$omodule" loaded 'yes'
|
|
|
|
zstyle ":omz:module:$omodule" loaded 'yes'
|
|
|
|
|
|
|
|
# Add functions to fpath.
|
|
|
|
|
|
|
|
fpath=(${omodules:+${OMZ}/modules/${^omodules}/functions(/FN)} $fpath)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Load Oh My Zsh functions.
|
|
|
|
|
|
|
|
for ofunction in \
|
|
|
|
|
|
|
|
$OMZ/modules/${^omodules}/functions/^([_.]*|prompt_*_setup|README*)(.N:t)
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
autoload -Uz "$ofunction"
|
|
|
|
|
|
|
|
done
|
|
|
|
else
|
|
|
|
else
|
|
|
|
zstyle ":omz:module:$omodule" loaded 'no'
|
|
|
|
zstyle ":omz:module:$omodule" loaded 'no'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|