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

From: Vitalie Spinu <[email-masked]>
Date: Sat, 29 Dec 2012 11:22:02 +0100

>> Chong Yidong <[email-masked]>
  >> on Sat, 29 Dec 2012 15:38:09 +0800 wrote:

[...]

  CY>     :version "24.1"
  CY> --- 346,354 ----
  CY>         "Old" "old" "New" "new" "'s" "login"
  CY>         "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
  CY>      " +\\)"
  CY> !    "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
  CY>      "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
  CY> ! \\(?: for [^:]+\\)?[:：៖]\\s *\\'")
  CY>     "Regexp matching prompts for passwords in the inferior process.
  CY>   This is used by `comint-watch-for-password-prompt'."
  CY>     :version "24.1"

It also tries things like "Enter 密码: " and "[sudo] 密码 for
user:". For a full proof solution, one would need to translate those as
well.

I wonder if it affects the speed of the output. The regexp is 800 chars
long, and it is used in comint-output-filter-functions, which are
executed on every single output chunk (roughly 500 chars).

May be match the language code (en, ru, zh etc) against the locale, and
keep only those password-word-equivalents that match.

    Vitalie