Subject: Re: bug#13124: 24.1; shell-mode does not hide sudo password prompts

From: Glenn Morris <[email-masked]>
Date: Mon, 10 Dec 2012 12:00:59 -0500

Arne Babenhauserheide wrote:

> Mine looks like this:
>
> arne@fluss /mnt/eis/backups $ sudo test
> Passwort: test

I'm afraid Emacs does not not understand the word "password" in every
language out-of-the-box, so you'll have to add an entry to
comint-password-prompt-regexp that matches "Passwort". Eg

(setq comint-password-prompt-regexp
  (concat
   "\\(^ *\\|"
   (regexp-opt
    '("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the"
      "Old" "old" "New" "new" "'s" "login"
      "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
   " +\\)"
   (regexp-opt
    '("password" "Password" "passphrase" "Passphrase"
      "pass phrase" "Pass phrase" "Response" "Passwort"))
   "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\|
  (again)\\)?\
\\(?: for [^:]+\\)?:\\s *\\'"))