From b4c06f2b50e499fbd6b827c1b287276d9cacd3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 9 Apr 2019 19:41:59 +0200 Subject: [PATCH] Complain when no autojump script was found --- plugins/autojump/autojump.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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