mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Fixing paths
This commit is contained in:
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,7 +26,6 @@ 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
|
||||
|
@ -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…
Reference in New Issue
Block a user