Browse code

Merge pull request #801 from kalos/autojump

autojump plugin enhanced

Robby Russell authored on 22/01/2012 at 21:09:59
Showing 1 changed files
... ...
@@ -1,5 +1,9 @@
1
-if [ -f /opt/local/etc/profile.d/autojump.sh ]; then
2
-  . /opt/local/etc/profile.d/autojump.sh
3
-elif [ -f `brew --prefix`/etc/autojump ]; then
4
-  . `brew --prefix`/etc/autojump
1
+if [ $commands[autojump] ]; then # check if autojump is installed
2
+  if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
3
+    . /usr/share/autojump/autojump.zsh
4
+  elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
5
+    . /etc/profile.d/autojump.zsh
6
+  elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump ]; then # mac os x with brew
7
+    . `brew --prefix`/etc/autojump
8
+  fi
5 9
 fi