]> arthur.barton.de Git - ax-zsh.git/commitdiff
Show a warning message when plugins can't be found
authorAlexander Barton <alex@barton.de>
Fri, 17 Jul 2015 19:34:53 +0000 (21:34 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 17 Jul 2015 19:34:53 +0000 (21:34 +0200)
ax.zsh

diff --git a/ax.zsh b/ax.zsh
index dc2fdaff2a07676af10a2e17e53f1fd8d2ffe2c1..d25a237e52f2667062a2b79cbfc3bdec69670bb6 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -36,8 +36,14 @@ function axzsh_load_plugin {
                fi
                return 0
        done
-       [[ -f "$HOME/.axzsh.debug" ]] \
-               && echo "Plugin \"$plugin\" not found (type \"$type\")!" >/dev/stderr
+       # Plugin not found!
+       if [[ -f "$HOME/.axzsh.debug" ]]; then
+               # Show error message for all stages in "debug mode":
+               echo "AX-ZSH plugin \"$plugin\" not found (type \"$type\")!" >&2
+       elif [[ "$type" == "zshrc" ]]; then
+               # Show error message for the "zshrc" stage:
+               echo "AX-ZSH plugin \"$plugin\" not found, skipped!" >&2
+       fi
        return 1
 }