summaryrefslogtreecommitdiff
path: root/plugins/autojump/autojump.plugin.zsh
diff options
context:
space:
mode:
authorJames Smith <james@loopj.com>2012-07-24 13:39:07 -0700
committerJames Smith <james@loopj.com>2012-07-24 13:39:07 -0700
commit772bc51c3a2372592c400e0d4e159a0128989ba2 (patch)
tree191af002e272ce95418910b9c0ea63443e48e681 /plugins/autojump/autojump.plugin.zsh
parent0ba398f9e1aaf05e72406d5c840f013eebb6b260 (diff)
parentd05b2010ffd4cd33ff9402c402051b1caf985d97 (diff)
downloadzsh-772bc51c3a2372592c400e0d4e159a0128989ba2.tar.gz
zsh-772bc51c3a2372592c400e0d4e159a0128989ba2.tar.bz2
zsh-772bc51c3a2372592c400e0d4e159a0128989ba2.zip
Merge
Diffstat (limited to 'plugins/autojump/autojump.plugin.zsh')
-rw-r--r--plugins/autojump/autojump.plugin.zsh10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
index da0a12765..6f0edb062 100644
--- a/plugins/autojump/autojump.plugin.zsh
+++ b/plugins/autojump/autojump.plugin.zsh
@@ -1,3 +1,9 @@
-if [ -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