* lisp/comint.el (comint-password-prompt-regexp): Allow text between
the prompt prefix and password equivalent.
* lisp/eshell/esh-mode.el (eshell-password-prompt-regexp): Accept some
unicode alternatives to ":".
* test/lisp/comint-tests.el (comint-testsuite-password-strings): Add
test case.
"Kerberos" "CVS" "UNIX" " SMB" "LDAP" "PEM" "SUDO"
"[sudo]" "Repeat" "Bad" "Retype")
t)
- " +\\)"
+ ;; Allow for user name to precede password equivalent (Bug#31075).
+ " +.*\\)"
"\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
"\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?"
;; "[[:alpha:]]" used to be "for", which fails to match non-English.
:group 'eshell-mode)
(defcustom eshell-password-prompt-regexp
- (format "\\(%s\\).*:\\s *\\'" (regexp-opt password-word-equivalents))
+ (format "\\(%s\\)[^::៖]*[::៖]\\s *\\'" (regexp-opt password-word-equivalents))
"Regexp matching prompts for passwords in the inferior process.
This is used by `eshell-watch-for-password-prompt'."
:type 'regexp
+ :version "27.1"
:group 'eshell-mode)
(defcustom eshell-skip-prompt-function nil
"Enter same passphrase again: " ; ssh-keygen
"Passphrase for key root@GNU.ORG: " ; plink
"[sudo] password for user:" ; Ubuntu sudo
+ "[sudo] user 的密码:" ; localized
"Password (again):"
"Enter password:"
"Mot de Passe :" ; localized (Bug#29729)