summaryrefslogtreecommitdiff
path: root/plugins/autojump
diff options
context:
space:
mode:
authorfred-o <fredrik.appelberg@gmail.com>2012-02-20 09:41:45 +0100
committerfred-o <fredrik.appelberg@gmail.com>2012-02-20 09:41:45 +0100
commit7e5dda7f434b847e4a8899beb736a7251da3d390 (patch)
tree45eccafa617e7e3ec4e7e97ff7569b157786dd6c /plugins/autojump
parentf5041025844a2509f42e0bb19cb8d5418340e10c (diff)
parent362927003bcd8052e294dcbdf14f061ef4f2e173 (diff)
downloadzsh-7e5dda7f434b847e4a8899beb736a7251da3d390.tar.gz
zsh-7e5dda7f434b847e4a8899beb736a7251da3d390.tar.bz2
zsh-7e5dda7f434b847e4a8899beb736a7251da3d390.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/autojump')
-rw-r--r--plugins/autojump/autojump.plugin.zsh12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
index 6f9b80bff..6f0edb062 100644
--- a/plugins/autojump/autojump.plugin.zsh
+++ b/plugins/autojump/autojump.plugin.zsh
@@ -1,5 +1,9 @@
-if [ -f /opt/local/etc/profile.d/autojump.sh ]; then
- . /opt/local/etc/profile.d/autojump.sh
-elif [ -f `brew --prefix`/etc/autojump ]; then
- . `brew --prefix`/etc/autojump
+if [ $commands[autojump] ]; then # check if autojump is installed
+ if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
+ . /usr/share/autojump/autojump.zsh
+ elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
+ . /etc/profile.d/autojump.zsh
+ elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump ]; then # mac os x with brew
+ . `brew --prefix`/etc/autojump
+ fi
fi