mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-19 18:37:12 +00:00
Shell: Fix shell version on bash 3
This commit is contained in:
4
neofetch
4
neofetch
@@ -525,7 +525,7 @@ get_shell() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$shell_version" == "on" ]]; then
|
if [[ "$shell_version" == "on" ]]; then
|
||||||
case "${SHELL##*/}" in
|
case "${shell_name:=${SHELL##*/}}" in
|
||||||
"bash") shell+="${BASH_VERSION/-*}" ;;
|
"bash") shell+="${BASH_VERSION/-*}" ;;
|
||||||
"sh" | "ash" | "dash") ;;
|
"sh" | "ash" | "dash") ;;
|
||||||
|
|
||||||
@@ -537,7 +537,7 @@ get_shell() {
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
shell+="$("$SHELL" --version 2>&1)"
|
shell+="$("$SHELL" --version 2>&1)"
|
||||||
shell="${shell/ ${SHELL##*/}}"
|
shell="${shell/ "${shell_name}"}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user