- for dname (
- "$AXZSH_PLUGIN_D/$plugin"
- "$ZSH_CUSTOM/$plugin"
- "$AXZSH/plugins/$plugin"
- "$AXZSH/core/$plugin"
- ); do
- [[ ! -d "$dname" ]] && continue
-
- fname="$dname/$plugin.$type"
- if [[ ! -r "$fname" && "$type" == "zshrc" ]]; then
- if [[ -r "$dname/$plugin.plugin.zsh" ]]; then
- # Oh My ZSH plugin
- type="plugin.zsh"
- fname="$dname/$plugin.plugin.zsh"
- elif [[ -r "$dname/init.zsh" ]]; then
- # Prezto module
- type="init.zsh"
- fname="$dname/init.zsh"
- fi
+ if [[ ! -d "$dname" ]]; then
+ # 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