unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: emacs-devel@gnu.org
Subject: comint-password-prompt-regexp
Date: Mon, 04 May 2020 13:09:25 +0200	[thread overview]
Message-ID: <87o8r47y8q.fsf@rub.de> (raw)

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.  I've determined that reason is that the
password prompt string passed to comint-output-filter begins with a
carriage return character (^M), and when the rest of the prompt string
begins with "Password" (which it can on this system),
comint-password-prompt-regexp does not match it and thus
comint-watch-for-password-prompt returns nil instead of calling
comint-send-invisible.

So far I haven't found out where the carriage return is coming from,
maybe it's openssh (on the system where the carriage return occurs in
the prompt string I have openssh-8.2p1, on the system where the carriage
return does not occur openssh-7.9p1; if anyone knows the answer, or has
a suggestion how to find out, I'd appreciate hearing it).  Of course, I
can just customize comint-password-prompt-regexp to match the prompt
with the carriage return.  But I'm asking here because, if this should
be a more general issue, maybe the default value of
comint-password-prompt-regexp should be changed.  In bug#31075 Noam
Postavsky pondered whether eshell-password-prompt-regexp should replace
comint-password-prompt-regexp, noting that "the eshell regexp looks much
simpler".  And indeed, on the system where the carriage return occurs in
the prompt string, using ssh in the Emacs shell (M-x eshell) does use
the minibuffer for password input and it is hidden; and if I set
comint-password-prompt-regexp to eshell-password-prompt-regexp, then I
also get minibuffer hidden input in shell-mode.

So should comint-password-prompt-regexp be replaced by
eshell-password-prompt-regexp?

Steve Berman



             reply	other threads:[~2020-05-04 11:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 11:09 Stephen Berman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-25 14:16 comint-password-prompt-regexp Francesco Potorti`
2002-10-26 20:15 ` comint-password-prompt-regexp Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8r47y8q.fsf@rub.de \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).