]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/plugins/autojump/autojump.plugin.zsh
merge oh-my-zsh into subdir
[dotfiles.git] / zsh / plugins / autojump / autojump.plugin.zsh
diff --git a/zsh/plugins/autojump/autojump.plugin.zsh b/zsh/plugins/autojump/autojump.plugin.zsh
new file mode 100644 (file)
index 0000000..3894ccd
--- /dev/null
@@ -0,0 +1,13 @@
+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 [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
+    . $HOME/.autojump/etc/profile.d/autojump.zsh
+  elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
+    . /opt/local/etc/profile.d/autojump.zsh
+  elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew
+    . `brew --prefix`/etc/autojump.zsh
+  fi
+fi