Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
654d89d7
Commit
654d89d7
authored
Jun 29, 1994
by
Noah Friedman
Browse files
comint-password-prompt-regexp: New variable.
comint-watch-for-password-prompt: Use it.
parent
5286a842
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lisp/comint.el
lisp/comint.el
+7
-2
No files found.
lisp/comint.el
View file @
654d89d7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment