When `comint-password-prompt-regexp' matches comint output, comint
prompts for non-echoed input with "Non-echoed text: " as prompt
message, this is inconvenient most of the time when you dont see
actual comint output and dont know which non-echoed input is required
to be entered, this patch makes comint to use output string as prompt
message when possible ..
----------------- cut here -----------------
--- comint.el.orig Thu Nov 17 08:51:11 2005
+++ comint.el Thu Nov 17 08:52:30 2005
@@ -1718,7 +1718,7 @@
(message "")
ans))))
-(defun send-invisible (str)
+(defun send-invisible (str &optional prompt)
"Read a string without echoing.
Then send it to the process running in the current buffer. A new-line
is additionally sent. String is not saved on comint input history list.
@@ -1729,7 +1729,7 @@
(if (not proc)
(error "Current buffer has no process")
(comint-send-string
- proc (if (stringp str) str (comint-read-noecho "Non-echoed text: " t)))
+ proc (if (stringp str) str (comint-read-noecho (or prompt "Non-echoed text:
" t))))
(comint-send-string proc "\n"))))
(defun comint-watch-for-password-prompt (string)
@@ -1740,7 +1740,7 @@
This function could be in the list `comint-output-filter-functions'."
(if (string-match comint-password-prompt-regexp string)
- (send-invisible nil)))
+ (send-invisible nil string)))
;; Low-level process communication
----------------- cut ends here -----------------
Thanks!
--
lg
Show replies by date