Shell: [ksh] Use --version
This commit is contained in:
parent
d1cd0fd741
commit
cd9b9bb00b
1 changed files with 4 additions and 4 deletions
8
neofetch
8
neofetch
|
@ -502,20 +502,20 @@ get_shell() {
|
||||||
case "${SHELL##*/}" in
|
case "${SHELL##*/}" in
|
||||||
"bash") shell+="${BASH_VERSION/-*}" ;;
|
"bash") shell+="${BASH_VERSION/-*}" ;;
|
||||||
|
|
||||||
"fish" | "zsh" | "tcsh" | "csh")
|
"fish" | "zsh" | "tcsh" | "csh" | "ksh")
|
||||||
shell+="$("$SHELL" --version)"
|
shell+="$("$SHELL" --version 2>&1)"
|
||||||
shell="${shell/${SHELL##*/}}"
|
shell="${shell/${SHELL##*/}}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"mksh" | "ksh")
|
"mksh")
|
||||||
shell+="$("$SHELL" -c 'printf "%s" "$KSH_VERSION"')"
|
shell+="$("$SHELL" -c 'printf "%s" "$KSH_VERSION"')"
|
||||||
shell="${shell/ * KSH}"
|
shell="${shell/ * KSH}"
|
||||||
shell="${shell/Version}"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Remove unwanted info
|
# Remove unwanted info
|
||||||
shell="${shell/, version}"
|
shell="${shell/, version}"
|
||||||
|
shell="${shell/version * sh/ksh}"
|
||||||
shell="${shell/options*}"
|
shell="${shell/options*}"
|
||||||
shell="${shell/\(*\)}"
|
shell="${shell/\(*\)}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue