1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-28 20:35:17 +08:00

init: fix erroneous plugin not found warning (#7686)

Co-authored-by: Se De <Sede7473@gmail.com>
This commit is contained in:
Avi ד 2019-03-22 14:37:08 -04:00 committed by Marc Cornellà
parent 8aa8405ea2
commit 1e11a3c112

View File

@ -44,6 +44,7 @@ is_plugin() {
test -f $base_dir/plugins/$name/$name.plugin.zsh \ test -f $base_dir/plugins/$name/$name.plugin.zsh \
|| test -f $base_dir/plugins/$name/_$name || test -f $base_dir/plugins/$name/_$name
} }
# Add all defined plugins to fpath. This must be done # Add all defined plugins to fpath. This must be done
# before running compinit. # before running compinit.
for plugin ($plugins); do for plugin ($plugins); do
@ -51,6 +52,8 @@ for plugin ($plugins); do
fpath=($ZSH_CUSTOM/plugins/$plugin $fpath) fpath=($ZSH_CUSTOM/plugins/$plugin $fpath)
elif is_plugin $ZSH $plugin; then elif is_plugin $ZSH $plugin; then
fpath=($ZSH/plugins/$plugin $fpath) fpath=($ZSH/plugins/$plugin $fpath)
else
echo "Warning: plugin $plugin not found"
fi fi
done done
@ -83,8 +86,6 @@ for plugin ($plugins); do
source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh
elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
source $ZSH/plugins/$plugin/$plugin.plugin.zsh source $ZSH/plugins/$plugin/$plugin.plugin.zsh
else
echo "Warning: plugin $plugin not found"
fi fi
done done