diff options
author | Noah Friedman <friedman@splode.com> | 1994-06-29 18:21:34 +0000 |
---|---|---|
committer | Noah Friedman <friedman@splode.com> | 1994-06-29 18:21:34 +0000 |
commit | 89a0c5c63139d12ac59d913e3762f2e5e6da0f46 (patch) | |
tree | 9bc521233abd6a969deec3f2026775dfd750b128 /lisp/comint.el | |
parent | d5ea1fad9719193119f08b9f6f3a73192f5d46ed (diff) | |
download | emacs-89a0c5c63139d12ac59d913e3762f2e5e6da0f46.tar.gz |
comint-password-prompt-regexp: New variable.
comint-watch-for-password-prompt: Use it.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 3a343303598..469c8c12fcd 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -219,6 +219,10 @@ appears in the buffer. This variable is buffer-local.") +(defvar comint-password-prompt-regexp "\\b[Pp]assword:\\s *\\'" + "*Regexp matching prompts for passwords in the inferior process. +This is used by comint-watch-for-password-prompt.") + ;;; Here are the per-interpreter hooks. (defvar comint-get-old-input (function comint-get-old-input-default) "Function that returns old text in comint mode. @@ -1389,10 +1393,11 @@ Security bug: your string can still be temporarily recovered with (defun comint-watch-for-password-prompt (string) "Prompt in the minibuffer for password and send without echoing. This function uses `send-invisible' to read and send a password to the buffer's -process if STRING contains a password prompt (matches \"^[Pp]assword:\\\\s *\\\\'\"). +process if STRING contains a password prompt defined by +`comint-password-prompt-regexp'. This function could be in the list `comint-output-filter-functions'." - (if (string-match "^[Pp]assword:\\s *\\'" string) + (if (string-match comint-password-prompt-regexp string) (send-invisible nil))) ;;; Low-level process communication |