Add command 'eat-send-password'
* eat.el (eat-send-password): New command. * eat.texi (Password Input): New chapter.
This commit is contained in:
parent
1dfca821f5
commit
7c1dde6f1a
2 changed files with 29 additions and 0 deletions
9
eat.el
9
eat.el
|
@ -5662,6 +5662,15 @@ EVENT is the mouse event."
|
||||||
;; Insert the text without putting it onto the kill ring.
|
;; Insert the text without putting it onto the kill ring.
|
||||||
(eat-term-send-string-as-yank eat-terminal pasted-text))))
|
(eat-term-send-string-as-yank eat-terminal pasted-text))))
|
||||||
|
|
||||||
|
(defun eat-send-password ()
|
||||||
|
"Read password from minibuffer and send it to the terminal."
|
||||||
|
(declare (interactive-only t))
|
||||||
|
(interactive)
|
||||||
|
(unless eat-terminal
|
||||||
|
(user-error "Process not running"))
|
||||||
|
(eat-term-send-string eat-terminal (read-passwd "Password: "))
|
||||||
|
(eat-self-input 1 'return))
|
||||||
|
|
||||||
;; When changing these keymaps, be sure to update the manual, README
|
;; When changing these keymaps, be sure to update the manual, README
|
||||||
;; and commentary.
|
;; and commentary.
|
||||||
(defvar eat-mode-map
|
(defvar eat-mode-map
|
||||||
|
|
20
eat.texi
20
eat.texi
|
@ -62,6 +62,7 @@ Basic Operations
|
||||||
* Keyboard:: Most keyboard keys are captured by Eat.
|
* Keyboard:: Most keyboard keys are captured by Eat.
|
||||||
* Mouse:: Eat supports mouse.
|
* Mouse:: Eat supports mouse.
|
||||||
* Input Modes:: Input modes for various use-cases.
|
* Input Modes:: Input modes for various use-cases.
|
||||||
|
* Password Input:: Safely inputting credentials.
|
||||||
|
|
||||||
Advanced Customizations
|
Advanced Customizations
|
||||||
* Shell Integration:: Getting the most from Eat and your shell.
|
* Shell Integration:: Getting the most from Eat and your shell.
|
||||||
|
@ -448,6 +449,25 @@ other parts of the Eat buffer, they search in the Eat buffer. If
|
||||||
Input history is not loaded from the shell history file, to do that,
|
Input history is not loaded from the shell history file, to do that,
|
||||||
@xref{Line Mode Integration}.
|
@xref{Line Mode Integration}.
|
||||||
|
|
||||||
|
@node Password Input
|
||||||
|
@cindex password input
|
||||||
|
@cindex credential input
|
||||||
|
@cindex input, password
|
||||||
|
@cindex input, credential
|
||||||
|
@chapter Password Input
|
||||||
|
|
||||||
|
By default, every keystroke gets recorded in the lossage, which can be
|
||||||
|
seen by pressing @kbd{C-h l}. This is actually a good thing, unless
|
||||||
|
you're inputting password.
|
||||||
|
|
||||||
|
@findex eat-send-command
|
||||||
|
Emacs doesn't record keystrokes when a password is read from the
|
||||||
|
minibuffer. However, when the password prompt is in the terminal, the
|
||||||
|
keys you use to type in your password gets recorded. To prevent this
|
||||||
|
from happening, you can use the command @command{eat-send-command},
|
||||||
|
it'll read password from the minibuffer and send it. Since the
|
||||||
|
password is read from the minibuffer, it's not recorded.
|
||||||
|
|
||||||
@part Part III:@* Advanced Customizations
|
@part Part III:@* Advanced Customizations
|
||||||
|
|
||||||
@node Shell Integration
|
@node Shell Integration
|
||||||
|
|
Loading…
Add table
Reference in a new issue