50fe95a69e471345f20fb88ae62e14ada43c134a
- Author
- Hong Xu <hong@topbug.net>
- Committer
- ncanceill <nicolas.canceill@ens-cachan.org>
- Date
Message
Autojump plugin: check user local installation first.
Users may install their own version of autojump to override the system
installed version.
Diff
1diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
2index 0aa14959d3540d9d34b3570248b58d722bcdac7f..50a694764c9166a5f63bb9caf1cfb4ce0aca51bc 100644
3--- a/plugins/autojump/autojump.plugin.zsh
4+++ b/plugins/autojump/autojump.plugin.zsh
5@@ -1,5 +1,7 @@
6 if [ $commands[autojump] ]; then # check if autojump is installed
7- if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
8+ if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
9+ . $HOME/.autojump/etc/profile.d/autojump.zsh
10+ elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
11 . /usr/share/autojump/autojump.zsh
12 elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
13 . /etc/profile.d/autojump.zsh
14@@ -7,8 +9,6 @@ if [ $commands[autojump] ]; then # check if autojump is installed
15 . /etc/profile.d/autojump.sh
16 elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation
17 . /usr/local/share/autojump/autojump.zsh
18- elif [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
19- . $HOME/.autojump/etc/profile.d/autojump.zsh
20 elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
21 . /opt/local/etc/profile.d/autojump.zsh
22 elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew