mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 14:53:53 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user