Commit: f920ab3f68ed69be61ced03ac5fc5dd0c92a6bb7
Parent: 74bc75bf98853c9637048dfb599fa07ce8f27364
Author: Klemens Nanni
Date:   Sun, 22 Oct 2017 14:26:59 +0200
Echo back characters after password prompt
On ksh `stty -echo' would be limited to readpw(), Bash has a broader
scope. This fixes typed input not being displayed back once a new
password entry was created.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/spm b/spm
@@ -51,6 +51,7 @@ gpg() {
 readpw() {
 	[ -t 0 ] && stty -echo && printf '%s' "${1}"
 	IFS= read -r "${2}"
+	[ -t 0 ] && stty echo
 	[ -z "${2}" ] && usage 'empty password'
 }