From 0bf5cc4c6f8d8cf8f79e6381790d2ddc3bc71ee1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 29 Nov 2019 17:47:42 +0000 Subject: [PATCH] pash: Ensure the terminal is left in a usable state --- pash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pash b/pash index 89c3645..7e12cfb 100755 --- a/pash +++ b/pash @@ -174,6 +174,10 @@ main() { umask 077 + # Ensure that we leave the terminal in a usable + # state on exit or Ctrl+C. + trap 'stty echo icanon' INT + case $1 in a*) pw_add "$2" ;; c*) pw_copy "$2" ;;