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

Fix for tcsh

This commit is contained in:
GlazerMann 2021-02-05 12:35:27 -06:00 committed by GitHub
parent 06e082c918
commit fee09ac42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,14 @@
# the login $SHELL isn't always the one used
# 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
shell="bash"
elif [ -n "${ZSH_NAME}" ]; then
shell="zsh"
elif [ -n "${__fish_datadir}" ]; then
shell="fish"
elif [ -n "${version}" ]; then
shell="tcsh"
else
shell=$(echo ${SHELL} | awk -F/ '{ print $NF }')
fi
@ -24,3 +25,15 @@ elif [ -s ~/.autojump/share/autojump/autojump.${shell} ]; then
elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then
source /usr/local/share/autojump/autojump.${shell}
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