emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

password prompt in comint.el


From: Francesco Potorti`
Subject: password prompt in comint.el
Date: Wed, 17 Apr 2002 11:49:57 +0200

Sometimes prompts for passwords begin with whitespace, which is annoying
and ugly when comint displays them in the minibuffer.  This happens for
example with GPG.

The following patch addresses this problem.  If it is okay, I can
install it.

--- comint.el.~1.269.~  Wed Apr 17 10:01:58 2002
+++ comint.el   Wed Apr 17 11:45:29 2002
@@ -1984,6 +1984,8 @@ process if STRING contains a password pr
 
 This function could be in the list `comint-output-filter-functions'."
   (when (string-match comint-password-prompt-regexp string)
+    (when (string-match "^[ \n\r\t\v\f\b\a]+" string)
+      (setq string (replace-match "" t t string)))
     (let ((pw (comint-read-noecho string t)))
       (send-invisible pw))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]