changeset 85619:fdebfdb3729e

Chris Moore <christopher.ian.moore at gmail.com> (comint-password-prompt-regexp): Handle `[sudo] password'-style prompt.
author Glenn Morris <rgm@gnu.org>
date Thu, 25 Oct 2007 03:53:10 +0000
parents e2b55f3f0f2b
children b4eec406ec78
files lisp/comint.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Thu Oct 25 03:51:50 2007 +0000
+++ b/lisp/comint.el	Thu Oct 25 03:53:10 2007 +0000
@@ -334,10 +334,11 @@
 ;; ksu prints a prompt like `Kerberos password for devnull/root@GNU.ORG: '.
 ;; ssh-add prints a prompt like `Enter passphrase: '.
 ;; plink prints a prompt like `Passphrase for key "root@GNU.ORG": '.
+;; Ubuntu's sudo prompts like `[sudo] password for user:'
 ;; Some implementations of passwd use "Password (again)" as the 2nd prompt.
 (defcustom comint-password-prompt-regexp
   "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\
-Kerberos \\|CVS \\|UNIX \\| SMB \\|LDAP \\|^\\)\
+Kerberos \\|CVS \\|UNIX \\| SMB \\|LDAP \\|\\[sudo] \\|^\\)\
 \[Pp]assword\\( (again)\\)?\\|\
 pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\
 \\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'"