1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

refactoring

This commit is contained in:
William Ting 2012-11-22 14:15:28 -06:00
parent 02a47db68d
commit 837671fe0b

View File

@ -1,14 +1,13 @@
# Source autojump on BASH or ZSH depending on the shell # source autojump on BASH or ZSH depending on the shell
if [ "$BASH_VERSION" ] && [ -n "$PS1" ] && echo $SHELLOPTS | grep -v posix >>/dev/null; then
if [ -f ~/.autojump/etc/profile.d/autojump.bash ]; then shell=`echo ${SHELL} | awk -F/ '{ print $NF }'`
source ~/.autojump/etc/profile.d/autojump.bash
elif [ -f /etc/profile.d/autojump.bash ]; then # check local install
source /etc/profile.d/autojump.bash if [ -s ~/.autojump/etc/profile.d/autojump.${shell} ]; then
fi source ~/.autojump/etc/profile.d/autojump.${shell}
elif [ "$ZSH_VERSION" ] && [ -n "$PS1" ]; then
if [ -f ~/.autojump/etc/profile.d/autojump.zsh ]; then # check global install
source ~/.autojump/etc/profile.d/autojump.zsh elif [ -s /etc/profile.d/autojump.${shell} ]; then
elif [ -f /etc/profile.d/autojump.zsh ]; then source /etc/profile.d/autojump.${shell}
source /etc/profile.d/autojump.zsh
fi
fi fi