emacs-devel
[Top][All Lists]
Advanced

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

Re: comint-password-prompt-regexp in comint.el


From: Glenn Morris
Subject: Re: comint-password-prompt-regexp in comint.el
Date: Fri, 17 May 2013 15:02:51 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

"Ota, Takaaki" wrote:

> Would you consider the attached modification to cover the next case?
[...]
> Password for 'https://address@hidden': 
[...]
> *** comint.el 2013-05-16 14:54:43.632331049 -0700
> --- comint.el.mod     2013-05-16 14:53:37.608329808 -0700
> ***************
> *** 349,355 ****
>      (regexp-opt
>       '("password" "Password" "passphrase" "Passphrase"
>         "pass phrase" "Pass phrase" "Response"))
> !    "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
>   \\(?: for [^:]+\\)?:\\s *\\'")
>     "Regexp matching prompts for passwords in the inferior process.
>   This is used by `comint-watch-for-password-prompt'."
> --- 349,355 ----
>      (regexp-opt
>       '("password" "Password" "passphrase" "Passphrase"
>         "pass phrase" "Pass phrase" "Response"))
> !    "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\| 
> for '.*'\\)?\
>   \\(?: for [^:]+\\)?:\\s *\\'")
>     "Regexp matching prompts for passwords in the inferior process.
>   This is used by `comint-watch-for-password-prompt'."

Wouldn't something simpler be better?

--- lisp/comint.el 2013-05-15 23:55:41 +0000
+++ lisp/comint.el 2013-05-17 19:01:22 +0000
@@ -351,7 +351,7 @@
     '("password" "Password" "passphrase" "Passphrase"
       "pass phrase" "Pass phrase" "Response"))
    "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\|
    (again)\\)?\
-\\(?: for [^:]+\\)?:\\s *\\'")
+\\(?: for .+\\)?:\\s *\\'")
   "Regexp matching prompts for passwords in the inferior process.
 This is used by `comint-watch-for-password-prompt'."
   :version "24.1"


PS I think it would have been better to report this as a bug.



reply via email to

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