aboutsummaryrefslogtreecommitdiffstats
path: root/doc/aerc.1.scd
diff options
context:
space:
mode:
authorVitaly Ovchinnikov <v@postbox.nz>2023-09-29 18:48:47 +0000
committerRobin Jarry <robin@jarry.cc>2023-10-22 14:56:27 +0200
commit14fc59f189775dbe95daf582c08c9c1b3cd949b2 (patch)
tree285a1b8bb0d4a27a0d04ebd09287d0cabd9654ce /doc/aerc.1.scd
parent6bbb477d441b17756f89e0034c26c4c3cdc941af (diff)
downloadaerc-14fc59f189775dbe95daf582c08c9c1b3cd949b2.tar.gz
terminal: add `:send-keys` command
Add a new command for sending keystrokes to the active terminal, if there is one visible. Covers split preview, message viewer, composer and the terminal mode. This can be used to navigate the embedded applications to scroll or safely quit them when needed. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'doc/aerc.1.scd')
-rw-r--r--doc/aerc.1.scd17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/aerc.1.scd b/doc/aerc.1.scd
index e51ae8d1..a48735d7 100644
--- a/doc/aerc.1.scd
+++ b/doc/aerc.1.scd
@@ -119,6 +119,23 @@ These commands work in any context.
*:pwd*
Displays aerc's current working directory in the status bar.
+*:send-keys* _<keystrokes>_
+ Send keystrokes to the currently visible terminal, if any. Can be used to
+ control embedded editors to save drafts or quit in a safe manner.
+
+ Here's an example of quiting a Vim-like editor:
+
+ *:send-keys* _<Esc>:wq!<Enter>_
+
+ Note: when used in _binds.conf_ (see *aerc-binds*(5)), angle brackets
+ need to be escaped in order to make their way to the command:
+
+ <C-q> = :send-keys \\<Esc\\>:wq!\\<Enter\\><Enter>
+
+ This way the _<Esc>_ and the first _<Enter>_ keystrokes are passed to
+ *:send-keys*, while the last _<Enter>_ keystroke is executed directly,
+ committing the *:send-keys* command's execution.
+
*:term* [_<command>..._]++
*:terminal*
Opens a new terminal tab with a shell running in the current working