# HG changeset patch # User Chong Yidong # Date 1270943690 14400 # Node ID ffe32691e3abc74310c1b9fd7d6820e38a8fe25a # Parent 46975e084e0ca1fddb7534d984abd10db76e8bc4 Update comint-password-prompt-regexp (Bug#2817). * comint.el (comint-password-prompt-regexp): Use regexp-opt, and recognize ssh-keygen prompt (Bug#2817). diff -r 46975e084e0c -r ffe32691e3ab lisp/ChangeLog --- a/lisp/ChangeLog Sat Apr 10 13:38:48 2010 -0700 +++ b/lisp/ChangeLog Sat Apr 10 19:54:50 2010 -0400 @@ -1,3 +1,8 @@ +2010-04-10 Jari Aalto + + * comint.el (comint-password-prompt-regexp): Use regexp-opt, and + recognize ssh-keygen prompt (Bug#2817). + 2010-04-10 Michael Albinus * net/tramp.el (tramp-do-copy-or-rename-file): Add progress reporter. diff -r 46975e084e0c -r ffe32691e3ab lisp/comint.el --- a/lisp/comint.el Sat Apr 10 13:38:48 2010 -0700 +++ b/lisp/comint.el Sat Apr 10 19:54:50 2010 -0400 @@ -340,11 +340,17 @@ ;; Some implementations of passwd use "Password (again)" as the 2nd prompt. ;; Something called "perforce" uses "Enter password:". (defcustom comint-password-prompt-regexp - "\\(\\(Enter \\|[Oo]ld \\|[Nn]ew \\|'s \\|login \\|\ -Kerberos \\|CVS \\|UNIX \\| SMB \\|LDAP \\|\\[sudo] \\|^\\)\ -\[Pp]assword\\( (again)\\)?\\|\ -pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\ -\\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'" + (concat + "^\\(" + (regexp-opt + '("Enter" "Enter same" "Old" "old" "New" "new" "'s" "login" + "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad")) + " +\\)?" + (regexp-opt + '("password" "Password" "passphrase" "Passphrase" + "pass phrase" "Pass phrase")) + "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\ +\\(?: for [^:]+\\)?:\\s *\\'") "Regexp matching prompts for passwords in the inferior process. This is used by `comint-watch-for-password-prompt'." :type 'regexp