Strip -<suffix> when autodetecting shell (#377)

For example bash-5.1, bash-static.
This commit is contained in:
Ville Skyttä
2022-10-18 20:37:46 +03:00
committed by GitHub
parent c4de2555b7
commit d5f2878a97

View File

@@ -45,6 +45,7 @@ if [ -z "$shell" ]; then
shell="${shell%% *}"
shell="${shell:-$SHELL}"
shell="${shell##*/}"
shell="${shell%%-*}"
fi
if [ -z "$print" ]; then