* bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again)
@ 2021-11-07 16:32 Stephen Berman
2021-11-07 20:33 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Berman @ 2021-11-07 16:32 UTC (permalink / raw)
To: 51666
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.
In GNU Emacs 28.0.60 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.17.4)
of 2021-11-06 built on strobelfs
Repository revision: 0d6b2b0b9dcb958193f21bd5bd3bd389a42b3de2
Repository branch: emacs-28
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Linux From Scratch 10.2-rc1
Configured using:
'configure --with-native-compilation 'CFLAGS=-Og -g3'
PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again)
2021-11-07 16:32 bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again) Stephen Berman
@ 2021-11-07 20:33 ` Lars Ingebrigtsen
2021-11-08 10:22 ` Stephen Berman
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-07 20:33 UTC (permalink / raw)
To: Stephen Berman; +Cc: 51666
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again)
2021-11-07 20:33 ` Lars Ingebrigtsen
@ 2021-11-08 10:22 ` Stephen Berman
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2021-11-08 10:22 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 51666
On Sun, 07 Nov 2021 21:33:33 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote:
> 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.
FTR, I confirm that this patch fixes the problem for me. Thanks!
Steve Berman
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-08 10:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-07 16:32 bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again) Stephen Berman
2021-11-07 20:33 ` Lars Ingebrigtsen
2021-11-08 10:22 ` Stephen Berman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.