summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2019-04-09 19:41:59 +0200
committerMarc Cornellà <marc.cornella@live.com>2019-04-09 19:45:49 +0200
commitb4c06f2b50e499fbd6b827c1b287276d9cacd3e6 (patch)
tree2417a04cf2bd3ff1f2dc2ff7d9abc299b4aefd34
parentfd105b6e528127c2c6f5cf59d0e32d761c206971 (diff)
downloadzsh-b4c06f2b50e499fbd6b827c1b287276d9cacd3e6.tar.gz
zsh-b4c06f2b50e499fbd6b827c1b287276d9cacd3e6.tar.bz2
zsh-b4c06f2b50e499fbd6b827c1b287276d9cacd3e6.zip
Complain when no autojump script was found
-rw-r--r--plugins/autojump/autojump.plugin.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
index 7ccd09303..13c1d00ed 100644
--- a/plugins/autojump/autojump.plugin.zsh
+++ b/plugins/autojump/autojump.plugin.zsh
@@ -28,7 +28,12 @@ done
# if no path found, try Homebrew
if (( ! found && $+commands[brew] )); then
file=$(brew --prefix)/etc/profile.d/autojump.sh
- [[ -f "$file" ]] && source "$file"
+ if [[ -f "$file" ]]; then
+ source "$file"
+ found=1
+ fi
fi
+(( ! found )) && echo '[oh-my-zsh] autojump script not found'
+
unset autojump_paths file found