pash: Ensure the terminal is left in a usable state

This commit is contained in:
Dylan Araps 2019-11-29 17:47:42 +00:00
parent a6d599a214
commit 0bf5cc4c6f
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

4
pash
View File

@ -174,6 +174,10 @@ main() {
umask 077 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 case $1 in
a*) pw_add "$2" ;; a*) pw_add "$2" ;;
c*) pw_copy "$2" ;; c*) pw_copy "$2" ;;