From 1e11a3c112f47ee87f432a5410755239ff43b0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Avi=20=D7=93?= Date: Fri, 22 Mar 2019 14:37:08 -0400 Subject: [PATCH] init: fix erroneous plugin not found warning (#7686) Co-authored-by: Se De --- oh-my-zsh.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index fbb10dd82..e080257c1 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -44,6 +44,7 @@ is_plugin() { test -f $base_dir/plugins/$name/$name.plugin.zsh \ || test -f $base_dir/plugins/$name/_$name } + # Add all defined plugins to fpath. This must be done # before running compinit. for plugin ($plugins); do @@ -51,6 +52,8 @@ for plugin ($plugins); do fpath=($ZSH_CUSTOM/plugins/$plugin $fpath) elif is_plugin $ZSH $plugin; then fpath=($ZSH/plugins/$plugin $fpath) + else + echo "Warning: plugin $plugin not found" fi done @@ -83,8 +86,6 @@ for plugin ($plugins); do source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then source $ZSH/plugins/$plugin/$plugin.plugin.zsh - else - echo "Warning: plugin $plugin not found" fi done