Commit cd9b9bb0 authored by Dylan Araps's avatar Dylan Araps

Shell: [ksh] Use --version

parent d1cd0fd7
...@@ -502,20 +502,20 @@ get_shell() { ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment