summaryrefslogtreecommitdiff
path: root/lisp/eshell/esh-mode.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2014-01-19 14:23:18 +0100
committerMichael Albinus <michael.albinus@gmx.de>2014-01-19 14:23:18 +0100
commit9367550017b1c592e40c276d81e23950f5f2f940 (patch)
treea92a27cdb9360133c9334de73b820310217f639f /lisp/eshell/esh-mode.el
parente3af763f4da9157de53f0533a7fb32fb831994e6 (diff)
downloademacs-9367550017b1c592e40c276d81e23950f5f2f940.tar.gz
* eshell/esh-mode.el (eshell-password-prompt-regexp):
Use `password-word-equivalents'. (eshell-watch-for-password-prompt): Let-bind `case-fold-search' to t. (Bug#5664, Bug#13124)
Diffstat (limited to 'lisp/eshell/esh-mode.el')
-rw-r--r--lisp/eshell/esh-mode.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 3d37ce87781..27f3411b4a9 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -182,7 +182,7 @@ inserted. They return the string as it should be inserted."
:group 'eshell-mode)
(defcustom eshell-password-prompt-regexp
- "[Pp]ass\\(word\\|phrase\\).*:\\s *\\'"
+ (format "\\(%s\\).*:\\s *\\'" (regexp-opt password-word-equivalents))
"Regexp matching prompts for passwords in the inferior process.
This is used by `eshell-watch-for-password-prompt'."
:type 'regexp
@@ -947,11 +947,12 @@ buffer's process if STRING contains a password prompt defined by
This function could be in the list `eshell-output-filter-functions'."
(when (eshell-interactive-process)
(save-excursion
- (goto-char eshell-last-output-block-begin)
- (beginning-of-line)
- (if (re-search-forward eshell-password-prompt-regexp
- eshell-last-output-end t)
- (eshell-send-invisible)))))
+ (let ((case-fold-search t))
+ (goto-char eshell-last-output-block-begin)
+ (beginning-of-line)
+ (if (re-search-forward eshell-password-prompt-regexp
+ eshell-last-output-end t)
+ (eshell-send-invisible))))))
(custom-add-option 'eshell-output-filter-functions
'eshell-watch-for-password-prompt)