mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Fix for tcsh
This commit is contained in:
parent
06e082c918
commit
fee09ac42b
@ -1,13 +1,14 @@
|
|||||||
# 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
|
||||||
|
# Because csh is so different from sh, we cannot use the same code
|
||||||
|
echo $shell | grep -q csh && goto CSH
|
||||||
|
|
||||||
if [ -n "${BASH}" ]; then
|
if [ -n "${BASH}" ]; then
|
||||||
shell="bash"
|
shell="bash"
|
||||||
elif [ -n "${ZSH_NAME}" ]; then
|
elif [ -n "${ZSH_NAME}" ]; then
|
||||||
shell="zsh"
|
shell="zsh"
|
||||||
elif [ -n "${__fish_datadir}" ]; then
|
elif [ -n "${__fish_datadir}" ]; then
|
||||||
shell="fish"
|
shell="fish"
|
||||||
elif [ -n "${version}" ]; then
|
|
||||||
shell="tcsh"
|
|
||||||
else
|
else
|
||||||
shell=$(echo ${SHELL} | awk -F/ '{ print $NF }')
|
shell=$(echo ${SHELL} | awk -F/ '{ print $NF }')
|
||||||
fi
|
fi
|
||||||
@ -24,3 +25,15 @@ 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}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
# csh/tcsh jump here
|
||||||
|
CSH:
|
||||||
|
|
||||||
|
if ( -f ~/.autojump/share/autojump/autojump.tcsh ) then
|
||||||
|
source ~/.autojump/share/autojump/autojump.tcsh
|
||||||
|
# check global install
|
||||||
|
else if ( -f /usr/local/share/autojump/autojump.tcsh ) then
|
||||||
|
source /usr/local/share/autojump/autojump.tcsh
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user