Variable: comint-password-function

comint-password-function is a buffer-local variable defined in comint.el.gz.

Documentation

Abnormal hook run when prompted for a password.

This function gets one argument, a string containing the prompt. It may return a string containing the password, or nil if normal password prompting should occur.

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
;; These three functions are for entering text you don't want echoed or
;; saved -- typically passwords to ftp, telnet, or somesuch.
;; Just enter m-x comint-send-invisible and type in your line.

(defvar-local comint-password-function nil
  "Abnormal hook run when prompted for a password.
This function gets one argument, a string containing the prompt.
It may return a string containing the password, or nil if normal
password prompting should occur.")