From d8e27e33f6597feca9a02073ce480e9abc182e66 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 25 Oct 2007 03:53:10 +0000 Subject: [PATCH] Chris Moore (comint-password-prompt-regexp): Handle `[sudo] password'-style prompt. --- lisp/comint.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index 623eef17327..f1d9243cc60 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -334,10 +334,11 @@ This variable is buffer-local." ;; 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 *\\'" -- 2.39.2