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

Prevents circular sourcing if shell is #/bin/sh

Closes #203.
This commit is contained in:
William Ting 2013-04-18 16:43:43 -05:00
parent 3bbd8e8e50
commit 72fe7e391d

View File

@ -2,8 +2,12 @@
shell=`echo ${SHELL} | awk -F/ '{ print $NF }'`
# prevent circular loop for sh shells
if [ "${shell}" == "sh" ]; then
exit 0
# check local install
if [ -s ~/.autojump/etc/profile.d/autojump.${shell} ]; then
elif [ -s ~/.autojump/etc/profile.d/autojump.${shell} ]; then
source ~/.autojump/etc/profile.d/autojump.${shell}
# check global install