aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/cli.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-02-10 17:03:42 +0100
committerGitHub <noreply@github.com>2026-02-10 17:03:42 +0100
commite160e9e7ee742f84d6f793ba4741cc422d3fae44 (patch)
treec3473faad0c4914c64052c02d059142b1a7d8f1a /zellij-utils/src/cli.rs
parentImprove plugin API ergonomics and add CLI goodies (#4690) (diff)
downloadsl0ppij-e160e9e7ee742f84d6f793ba4741cc422d3fae44.tar.gz
sl0ppij-e160e9e7ee742f84d6f793ba4741cc422d3fae44.tar.xz
sl0ppij-e160e9e7ee742f84d6f793ba4741cc422d3fae44.zip
Allow writing characters, bytes and keys to specific panes from the CLI (#4691)
* initial implementation * fix tests * implement zellij action send-keys * rustfmt * add test * fix tests and add pr
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r--zellij-utils/src/cli.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index 1b0bd7c8..376eafa1 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -603,10 +603,26 @@ pub enum CliAction {
/// Write bytes to the terminal.
Write {
bytes: Vec<u8>,
+ /// The pane_id of the pane, eg. terminal_1, plugin_2 or 3 (equivalent to terminal_3)
+ #[clap(short, long, value_parser)]
+ pane_id: Option<String>,
},
/// Write characters to the terminal.
WriteChars {
chars: String,
+ /// The pane_id of the pane, eg. terminal_1, plugin_2 or 3 (equivalent to terminal_3)
+ #[clap(short, long, value_parser)]
+ pane_id: Option<String>,
+ },
+ /// Send one or more keys to the terminal (e.g., "Ctrl a", "F1", "Alt Shift b")
+ SendKeys {
+ /// Keys to send as space-separated strings
+ #[clap(value_parser, required = true)]
+ keys: Vec<String>,
+
+ /// The pane_id of the pane, eg. terminal_1, plugin_2 or 3 (equivalent to terminal_3)
+ #[clap(short, long, value_parser)]
+ pane_id: Option<String>,
},
/// [increase|decrease] the focused panes area at the [left|down|up|right] border.
Resize {