changeset 79178:4577723dbc65

Chris Moore <christopher.ian.moore at gmail.com> (comint-password-prompt-regexp): Handle `[sudo] password'-style prompt.
author Glenn Morris <rgm@gnu.org>
date Tue, 23 Oct 2007 07:10:41 +0000
parents 3aa5f50b34c0
children f338c68ec332
files lisp/comint.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Tue Oct 23 07:00:13 2007 +0000
+++ b/lisp/comint.el	Tue Oct 23 07:10:41 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 *\\'"