Shell: Make all other shells use --version

This commit is contained in:
Dylan Araps 2016-12-15 22:27:13 +11:00
parent 91825d4bc7
commit 844720f85a

View file

@ -502,15 +502,15 @@ get_shell() {
case "${SHELL##*/}" in
"bash") shell+="${BASH_VERSION/-*}" ;;
"fish" | "zsh" | "tcsh" | "csh" | "ksh" | "xonsh")
shell+="$("$SHELL" --version 2>&1)"
shell="${shell/${SHELL##*/}}"
;;
"mksh")
shell+="$("$SHELL" -c 'printf "%s" "$KSH_VERSION"')"
shell="${shell/ * KSH}"
;;
*)
shell+="$("$SHELL" --version 2>&1)"
shell="${shell/${SHELL##*/}}"
;;
esac
# Remove unwanted info