1e11a3c112f47ee87f432a5410755239ff43b0bb

Author
Avi ד <avi.the.coder@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

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

Co-authored-by: Se De <Sede7473@gmail.com>

Diff

 1diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
 2index fbb10dd82d266e95a7083b2aa0d10e1e8bd15b24..e080257c15b500df1e061a947de021b5506f1b69 100644
 3--- a/oh-my-zsh.sh
 4+++ b/oh-my-zsh.sh
 5@@ -44,6 +44,7 @@ is_plugin() {
 6   test -f $base_dir/plugins/$name/$name.plugin.zsh \
 7     || test -f $base_dir/plugins/$name/_$name
 8 }
 9+
10 # Add all defined plugins to fpath. This must be done
11 # before running compinit.
12 for plugin ($plugins); do
13@@ -51,6 +52,8 @@ for plugin ($plugins); do
14     fpath=($ZSH_CUSTOM/plugins/$plugin $fpath)
15   elif is_plugin $ZSH $plugin; then
16     fpath=($ZSH/plugins/$plugin $fpath)
17+  else
18+    echo "Warning: plugin $plugin not found"
19   fi
20 done
21 
22@@ -83,8 +86,6 @@ for plugin ($plugins); do
23     source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh
24   elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
25     source $ZSH/plugins/$plugin/$plugin.plugin.zsh
26-  else
27-    echo "Warning: plugin $plugin not found"
28   fi
29 done
30