Function: eshell-watch-for-password-prompt

eshell-watch-for-password-prompt is a byte-compiled function defined in esh-mode.el.gz.

Signature

(eshell-watch-for-password-prompt)

Documentation

Prompt in the minibuffer for password and send without echoing.

This function uses eshell-send-invisible to read and send a password to the buffer's process if STRING contains a password prompt defined by eshell-password-prompt-regexp.

This function could be in the list eshell-output-filter-functions.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-mode.el.gz
(defun eshell-watch-for-password-prompt ()
  "Prompt in the minibuffer for password and send without echoing.
This function uses `eshell-send-invisible' to read and send a password to the
buffer's process if STRING contains a password prompt defined by
`eshell-password-prompt-regexp'.

This function could be in the list `eshell-output-filter-functions'."
  (when (eshell-interactive-process)
    (save-excursion
      (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))))))