all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#31075: 25.2; shell/eshell password prompt have not hide password input
@ 2018-04-06  1:18 Rugang Chen
  2018-06-26  2:22 ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: Rugang Chen @ 2018-04-06  1:18 UTC (permalink / raw)
  To: 31075

[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]

I found that command sudo has two pattern for english and chinese.
```
urugang@urugang-ubuntu:~$ LC_ALL=C sudo ls
[sudo] password for urugang:
urugang@urugang-ubuntu:~$ LC_ALL=zh_CN.utf8 sudo ls
[sudo] urugang 的密码:
```

So i think we should change comint-password-prompt-regexp from
```
(defcustom 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-word-equivalents) "\\|Response\\)"
   "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
\\(?: for [^::៖]+\\)?[::៖]\\s *\\'")
  "Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
  :version "24.4"
  :type 'regexp
  :group 'comint)
```
to
```
(defcustom 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-word-equivalents) "\\|Response\\)"
   "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
\\(?: for [^::៖]+\\)?[::៖]\\s *\\'")
  "Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
  :version "24.4"
  :type 'regexp
  :group 'comint)
```
In short, change `" +\\)"` to `" +.*\\)"`.

I have a question that why eshell dot not use same password prompt
patter in commit-mode.

```
(setq eshell-password-prompt-regexp comint-password-prompt-regexp)
```

[-- Attachment #2: Type: text/html, Size: 2656 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-24 11:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-06  1:18 bug#31075: 25.2; shell/eshell password prompt have not hide password input Rugang Chen
2018-06-26  2:22 ` Noam Postavsky
2018-08-24 11:50   ` Noam Postavsky

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.