diff options
author | Tom Willemsen | 2012-11-18 21:03:32 +0100 |
---|---|---|
committer | Tom Willemsen | 2012-11-18 21:03:32 +0100 |
commit | 32040e08a02c49a092db878214fcb10d13893e1c (patch) | |
tree | b46cd56ac8b1c4a3d82d2a3e46f35142eee94c09 | |
parent | 312e06ecabec90fcb911bdf41fceadd999ab8026 (diff) | |
download | dispass.el-32040e08a02c49a092db878214fcb10d13893e1c.tar.gz dispass.el-32040e08a02c49a092db878214fcb10d13893e1c.zip |
Clean-up prompts from dispass a little
Remove any leading and trailing whitespace and add a single space.
-rw-r--r-- | dispass.el | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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) |