Clean-up prompts from dispass a little

Remove any leading and trailing whitespace and add a single space.
This commit is contained in:
Tom Willemsen 2012-11-18 21:03:32 +01:00
parent 312e06ecab
commit 32040e08a0

View file

@ -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)