commit
49ff6045fb
1 changed files with 13 additions and 21 deletions
34
neofetch
34
neofetch
|
@ -494,38 +494,30 @@ get_packages() {
|
||||||
|
|
||||||
get_shell() {
|
get_shell() {
|
||||||
case "$shell_path" in
|
case "$shell_path" in
|
||||||
"on") shell="$SHELL" ;;
|
"on") shell="$SHELL " ;;
|
||||||
"off") shell="${SHELL##*/}" ;;
|
"off") shell="${SHELL##*/} " ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$shell_version" == "on" ]]; then
|
if [[ "$shell_version" == "on" ]]; then
|
||||||
shell+=" "
|
|
||||||
case "${SHELL##*/}" in
|
case "${SHELL##*/}" in
|
||||||
"bash")
|
"bash") shell+="${BASH_VERSION/-*}" ;;
|
||||||
shell+=" ${BASH_VERSION/-*}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"zsh")
|
"mksh")
|
||||||
shell+="$(zsh --version)"
|
|
||||||
shell="${shell/ zsh}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"mksh" | "ksh")
|
|
||||||
shell+="$("$SHELL" -c 'printf "%s" "$KSH_VERSION"')"
|
shell+="$("$SHELL" -c 'printf "%s" "$KSH_VERSION"')"
|
||||||
shell="${shell/ * KSH}"
|
shell="${shell/ * KSH}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"tcsh" | "csh")
|
*)
|
||||||
shell+="$("$SHELL" --version)"
|
shell+="$("$SHELL" --version 2>&1)"
|
||||||
shell="${shell/tcsh}"
|
shell="${shell/${SHELL##*/}}"
|
||||||
shell="${shell/\(*}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"fish")
|
|
||||||
shell+="$(fish --version)"
|
|
||||||
shell="${shell/fish, version}"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Remove unwanted info
|
||||||
|
shell="${shell/, version}"
|
||||||
|
shell="${shell/version * sh/ksh}"
|
||||||
|
shell="${shell/xonsh\//xonsh }"
|
||||||
|
shell="${shell/options*}"
|
||||||
shell="${shell/\(*\)}"
|
shell="${shell/\(*\)}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue