5809a4721dd1b575c1f4cbc3cc361520e97cd8b9

Author
Calogero Lo Leggio <kalos@nerdrug.org>
Committer
Calogero Lo Leggio <kalos@nerdrug.org>
Date

Message

check if autojump is installed

Diff

 1diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
 2index 72c416a17d80423c635bc4be2a3aa0bf570d2ba3..6f0edb062ac60bba4abc7b5fe84962ba286f8dee 100644
 3--- a/plugins/autojump/autojump.plugin.zsh
 4+++ b/plugins/autojump/autojump.plugin.zsh
 5@@ -1,9 +1,9 @@
 6-if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
 7-  . /usr/share/autojump/autojump.zsh
 8-elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
 9-  . /etc/profile.d/autojump.zsh
10-elif (`command -v brew >/dev/null`); then # mac os x with brew
11-  if [ -f `brew --prefix`/etc/autojump ]; then
12+if [ $commands[autojump] ]; then # check if autojump is installed
13+  if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
14+    . /usr/share/autojump/autojump.zsh
15+  elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
16+    . /etc/profile.d/autojump.zsh
17+  elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump ]; then # mac os x with brew
18     . `brew --prefix`/etc/autojump
19   fi
20 fi