Commit 1e11a3c1 authored by Avi ד's avatar Avi ד Committed by Marc Cornellà

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

Co-authored-by: 's avatarSe De <Sede7473@gmail.com>
parent 8aa8405e
...@@ -44,6 +44,7 @@ is_plugin() { ...@@ -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 ...@@ -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 ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment