From 32040e08a02c49a092db878214fcb10d13893e1c Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 18 Nov 2012 21:03:32 +0100 Subject: Clean-up prompts from dispass a little Remove any leading and trailing whitespace and add a single space. --- dispass.el | 8 ++++++-- 1 file 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) -- cgit v1.2.3-54-g00ecf