From 09d8840b1a3bcf2d829c7641161135cc111e41ff Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 4 Aug 2020 00:50:53 +0300 Subject: [PATCH] properly do it for once --- shfm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shfm b/shfm index 289500f..9a8a4b2 100755 --- a/shfm +++ b/shfm @@ -1,6 +1,7 @@ #!/bin/sh term_setup() { + stty=$(stty -g) stty -icanon -echo printf '\033[?1049h\033[?7l\033[?25l\033[2J\033[1;%sr' \ @@ -8,7 +9,7 @@ term_setup() { } term_reset() { - stty icanon echo + stty "$stty" printf '\033[?7h\033[?25h\033[2J\033[;r\033[?1049l' }