mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
Tweak sanitizing shell name
Handles situation when the output is `/bin/shell- args...`. First strip away the arguments, then the trailing dash.
This commit is contained in:
parent
32030e2ed9
commit
a9a9636d1e
1 changed files with 1 additions and 1 deletions
|
@ -34,8 +34,8 @@ done
|
||||||
shell="$1"
|
shell="$1"
|
||||||
if [ -z "$shell" ]; then
|
if [ -z "$shell" ]; then
|
||||||
shell="$(ps -p "$PPID" -o 'args=' 2>/dev/null || true)"
|
shell="$(ps -p "$PPID" -o 'args=' 2>/dev/null || true)"
|
||||||
shell="${shell##-}"
|
|
||||||
shell="${shell%% *}"
|
shell="${shell%% *}"
|
||||||
|
shell="${shell##-}"
|
||||||
shell="${shell:-$SHELL}"
|
shell="${shell:-$SHELL}"
|
||||||
shell="${shell##*/}"
|
shell="${shell##*/}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue