GNU bug report logs - #13124
add non-English regexps to comint-password-prompt-regexp for sudo password prompt

Previous Next

Package: emacs;

Reported by: arne_bab <at> web.de

Date: Sat, 8 Dec 2012 13:29:01 UTC

Severity: normal

Found in version 24.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #61 received at 13124 <at> debbugs.gnu.org (full text, mbox):

From: Arne Babenhauserheide <arne_bab <at> web.de>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 13124 <at> debbugs.gnu.org, Arne Babenhauserheide <arne_bab <at> web.de>,
 Michael Albinus <michael.albinus <at> gmx.de>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#13124: 24.1; shell-mode does not hide sudo password prompts
Date: Thu, 16 Jan 2014 15:50:16 +0100
At Sat, 29 Dec 2012 15:38:09 +0800,
Hi,

Chong Yidong wrote:
> Anyone have objections to the following patch?  It introduces a new
> option `password-word-equivalents' for this purpose.
> !    "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"

For me this would fix the issue. I now applied something similar as
variable, but I would much prefer to see it be the default: That would
also solve the issue for a collegue of mine without me having to
explain him how the regexp works.
  
> + (defcustom password-word-equivalents
> +   '("password" "passphrase" "pass phrase"
> +     "كلمة السر"    ; ar
> +     "গুপ্তশব্দ"        ; as
> +     "পাসওয়ার্ড"       ; bn_IN
> +     "contrasenya"  ; ca
> +     "heslo"        ; cs
> +     "adgangskode"  ; da
> +     "passwort"     ; de
> +     "pasvorto"     ; eo
> +     "contraseña"   ; es
> +     "pasahitza"    ; eu
> +     "salasana"     ; fi
> +     "mot de passe" ; fr
> +     "પાસવર્ડ"       ; gu
> +     "ססמה"         ; he
> +     "शब्दकूट"        ; hi
> +     "lozinka"      ; hr
> +     "Jelszó: "     ; hu
> +     "パスワード"     ; ja
> +     "Пароль"       ; kk
> +     "ಗುಪ್ತಪದ"      ; kn
> +     "암호"         ; ko
> +     "ពាក្យសម្ងាត់" ; km
> +     "slaptažodis"  ; lt
> +     "അടയാളവാക്ക്"   ; ml
> +     "गुप्तशब्द"       ; mr
> +     "passord"      ; nb
> +     "wachtwoord"   ; nl
> +     "ପ୍ରବେଶ ସଙ୍କେତ" ; or
> +     "ਪਾਸਵਰਡ"       ; pa
> +     "hasło"        ; pl
> +     "senha"        ; pt
> +     "Пароль"       ; ru
> +     "රහස්පදය"      ; si
> +     "Heslo"        ; sk
> +     "geslo"        ; sl
> +     "lozinka"      ; sr
> +     "Лозинка"      ; sr
> +     "lösenord"     ; sv
> +     "கடவுச்சொல்"    ; ta
> +     "సంకేతపదము"     ; te
> +     "parola"       ; tr
> +     "Пароль"       ; uk
> +     "Mật khẩu"     ; vi
> +     "密码"          ; zh_CN
> +     "密碼"          ; zh_TW
> +     "iphasiwedi"   ; zu
> +     )
> +   "List of words equivalent to \"password\".
> + This is used by Shell mode and other parts of Emacs to recognize
> + password prompts, including prompts in languages other than
> + English.  Different case choices should not be assumed to be
> + included; callers should bind `case-fold-search' to t."
> +   :type '(repeat string)
> +   :version "24.4"
> +   :group 'processes)

Regarding the need to translate other parts of the password prompt
(like "enter"), I think that those would be useful, but that the
current fix is already a huge improvement, so it should not be held
back by not being perfect right away.

Should the :version keyword of defcustom for
comint-password-prompt-regexp be set to 24.4, too?

Best wishes,
Arne

PS: I’m sorry that I only answer now. I lost track of the issue and
only now found it again when the bug finally disturbed me enough that
I decided to fix it myself (I have a local fix, but it is not as nice
as your fix). I now answered here again, because I saw no fix in the
current trunk.




This bug report was last modified 11 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.