|
|
@ -1,8 +1,10 @@
|
|
|
|
# the login $SHELL isn't always the one used
|
|
|
|
# the login $SHELL isn't always the one used
|
|
|
|
# NOTE: problems might occur if /bin/sh is symlinked to /bin/bash
|
|
|
|
# NOTE: problems might occur if /bin/sh is symlinked to /bin/bash
|
|
|
|
if [ -n "${BASH}" ]; then
|
|
|
|
if [ -n "${BASH}" ]; then
|
|
|
|
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
shell="bash"
|
|
|
|
shell="bash"
|
|
|
|
elif [ -n "${ZSH_NAME}" ]; then
|
|
|
|
elif [ -n "${ZSH_NAME}" ]; then
|
|
|
|
|
|
|
|
SCRIPT_DIR="${0:a:h}"
|
|
|
|
shell="zsh"
|
|
|
|
shell="zsh"
|
|
|
|
elif [ -n "${__fish_datadir}" ]; then
|
|
|
|
elif [ -n "${__fish_datadir}" ]; then
|
|
|
|
shell="fish"
|
|
|
|
shell="fish"
|
|
|
@ -24,10 +26,9 @@ elif [ -s ~/.autojump/share/autojump/autojump.${shell} ]; then
|
|
|
|
elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then
|
|
|
|
elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then
|
|
|
|
source /usr/local/share/autojump/autojump.${shell}
|
|
|
|
source /usr/local/share/autojump/autojump.${shell}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
if [ -s "$SCRIPT_DIR/autojump.${shell}" ]; then
|
|
|
|
if [ -s "$SCRIPT_DIR/autojump.${shell}" ]; then
|
|
|
|
source "$SCRIPT_DIR/autojump.${shell}"
|
|
|
|
source "$SCRIPT_DIR/autojump.${shell}"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "ERROR: autojump not found"
|
|
|
|
echo "ERROR: autojump not found"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|