aboutsummaryrefslogtreecommitdiffstats
path: root/dispass.el
diff options
context:
space:
mode:
Diffstat (limited to 'dispass.el')
-rw-r--r--dispass.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/dispass.el b/dispass.el
index a3be9e4..12a7706 100644
--- a/dispass.el
+++ b/dispass.el
@@ -172,8 +172,12 @@ an eye out for LABEL."
`(lambda (proc string)
"Process STRING coming from PROC."
(cond ((string-match "^\\(Password[^:]*\\|Again\\): ?$" string)
- (process-send-string proc
- (concat (read-passwd string nil) "\n")))
+ (process-send-string
+ proc
+ (concat (read-passwd
+ (concat (replace-regexp-in-string
+ "^[ \t\n]+\\|[ \t\n]+$" "" string) " ")
+ nil) "\n")))
((string-match (concat "^[ \t]*" ,label "[ \t]*\\(.+\\)$")
string)