Restore original stty settings

This commit is contained in:
Ryan 2017-08-01 22:17:48 +01:00
parent a6fce2c863
commit 35ac6970af

View file

@ -263,9 +263,13 @@ cleanup_and_exit()
tput cnorm # unhide cursor
echo "$NORMAL" # normal colors
stty "$orig_stty" > /dev/null 2>&1
exit
}
# Store original terminal settings
orig_stty=$(stty -g)
# Catch a control-C interrupt and perform cleanup operations before exiting
trap cleanup_and_exit INT