浏览代码

Tweak sanitizing shell name

Handles situation when the output is `/bin/shell- args...`. First strip
away the arguments, then the trailing dash.
pull/653/head^2
Mislav Marohnić 10 年前
父节点
当前提交
a9a9636d1e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      libexec/rbenv-init

+ 1
- 1
libexec/rbenv-init 查看文件

@ -34,8 +34,8 @@ done
shell="$1"
if [ -z "$shell" ]; then
shell="$(ps -p "$PPID" -o 'args=' 2>/dev/null || true)"
shell="${shell##-}"
shell="${shell%% *}"
shell="${shell##-}"
shell="${shell:-$SHELL}"
shell="${shell##*/}"
fi

正在加载...
取消
保存