From bade83d5d580a092ae89ffd62ec458e89dbed28e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 00:49:14 +1100 Subject: [PATCH] Shell: Fix shell version on bash 3 --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index a739039e..3fe0c33b 100755 --- a/neofetch +++ b/neofetch @@ -525,7 +525,7 @@ get_shell() { esac if [[ "$shell_version" == "on" ]]; then - case "${SHELL##*/}" in + case "${shell_name:=${SHELL##*/}}" in "bash") shell+="${BASH_VERSION/-*}" ;; "sh" | "ash" | "dash") ;; @@ -537,7 +537,7 @@ get_shell() { *) shell+="$("$SHELL" --version 2>&1)" - shell="${shell/ ${SHELL##*/}}" + shell="${shell/ "${shell_name}"}" ;; esac