mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-14 12:37:16 +00:00
Shell: Make all other shells use --version
This commit is contained in:
10
neofetch
10
neofetch
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user