feat(init): strip -<suffix> when autodetecting shell

For example bash-5.1, bash-static.
This commit is contained in:
Ville Skyttä 2021-03-01 07:49:47 +02:00
parent c4de2555b7
commit 305cca74cb

View file

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