[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again
From: |
Lars Ingebrigtsen |
Subject: |
bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again) |
Date: |
Sun, 07 Nov 2021 21:33:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stephen Berman <stephen.berman@gmx.net> writes:
> On one of my systems, when using ssh in shell-mode (M-x shell), the
> password prompt does not appear in the minibuffer but only in the
> *shell* buffer directly under the ssh invocation, and the password is
> not hidden when it's entered. The password prompt has this form:
>
> (user@host) Password:
>
> and comint-password-prompt-regexp fails to match it. By contrast,
> eshell-password-prompt-regexp does match this prompt. This is with
> openssh-8.6p1. The fix in bug#43003 doesn't help here.
The following patch should fix the problem, but I'm a bit wary about
pushing it to Emacs 28, since these things may have unintended side
effects.
So I've pushed it to Emacs 29 instead.
diff --git a/lisp/comint.el b/lisp/comint.el
index c114bdf758..94e8e3b84b 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -385,7 +385,9 @@ comint-password-prompt-regexp
"\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'"
;; The ccrypt encryption dialogue doesn't end with a colon, so
;; treat it specially.
- "\\|^Enter encryption key: (repeat) *\\'")
+ "\\|^Enter encryption key: (repeat) *\\'"
+ ;; openssh-8.6p1 format: "(user@host) Password:".
+ "\\|^([^)@ \t\n]+@[^)@ \t\n]+) Password: *\\'")
"Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
:version "28.1"
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no