mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 12:09:55 +00:00
Only trap exit if images are enabled and fix trailing whitespace in getshell
This commit is contained in:
4
fetch
4
fetch
@@ -644,6 +644,7 @@ getshell () {
|
||||
esac
|
||||
|
||||
if [ "$shell_version" == "on" ]; then
|
||||
shell+=" "
|
||||
case "$shell" in
|
||||
*"bash"*)
|
||||
shell+="$(bash --version | head -n 1)"
|
||||
@@ -2163,10 +2164,11 @@ done
|
||||
# Restore cursor and clear screen on ctrl+c
|
||||
trap 'printf "\033[?25h"; clear; exit' 2
|
||||
|
||||
if [ "$image" != "off" ]; then
|
||||
# If the script exits for any reason, unhide the cursor.
|
||||
trap 'printf "\033[?25h"' EXIT
|
||||
|
||||
if [ "$image" != "off" ]; then
|
||||
# Clear the scren
|
||||
clear
|
||||
|
||||
# Hide the cursor
|
||||
|
||||
Reference in New Issue
Block a user