From: Lars Ingebrigtsen Date: Sun, 7 Nov 2021 20:34:41 +0000 (+0100) Subject: Match password prompts from new OpenSSH X-Git-Tag: emacs-29.0.90~3671^2~97 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=14bbebcf1d217dcfc679fc95f195867cdf267f89;p=emacs.git Match password prompts from new OpenSSH * lisp/comint.el (comint-password-prompt-regexp): Add support for the openssh-8.6p1 "(user@host) Password:" format (bug#51666). --- diff --git a/lisp/comint.el b/lisp/comint.el index c114bdf758a..adae971eff2 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -385,10 +385,12 @@ This variable is buffer-local." "\\(?: [[: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" + :version "29.1" :type 'regexp :group 'comint) diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el index e1bac81a185..0bd5c1e9d15 100644 --- a/test/lisp/comint-tests.el +++ b/test/lisp/comint-tests.el @@ -43,6 +43,7 @@ "PIN for user:" ; Bug#35523 "Password (again):" "Enter password:" + "(user@host) Password: " ; openssh-8.6p1 "Current password:" ; "passwd" (to change password) in Debian. "Enter encryption key: " ; ccrypt "Enter decryption key: " ; ccrypt