瀏覽代碼

Prevents circular sourcing if shell is #/bin/sh

Closes #203.
pull/192/merge
William Ting 11 年之前
父節點
當前提交
72fe7e391d
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      bin/autojump.sh

+ 5
- 1
bin/autojump.sh 查看文件

@ -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

Loading…
取消
儲存