Fixing paths

pull/534/head
Mitchell Ludwig 5 years ago
parent e42645df00
commit 7d166448c9

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

@ -1,6 +1,8 @@
export AUTOJUMP_SOURCED=1
SCRIPT_DIR="${0:a:h}"
# set user installation paths
path=(${SCRIPT_DIR} ${path})
if [[ -d ~/.autojump/bin ]]; then
path=(~/.autojump/bin ${path})
fi
@ -17,7 +19,7 @@ if command -v brew &>/dev/null; then
fi
fi
# set this installation path
# set error file location
if [[ "$(uname)" == "Darwin" ]]; then
export AUTOJUMP_ERROR_PATH=~/Library/autojump/errors.log

Loading…
Cancel
Save