aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-server/src/route.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-server/src/route.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-server/src/route.rs')
-rw-r--r--zellij-server/src/route.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs
index c16600af..a81f9ecc 100644
--- a/zellij-server/src/route.rs
+++ b/zellij-server/src/route.rs
@@ -251,6 +251,31 @@ pub(crate) fn route_action(
))
.with_context(err_context)?;
},
+ Action::WriteToPaneId { bytes, pane_id } => {
+ senders
+ .send_to_screen(ScreenInstruction::ClearScroll(client_id))
+ .with_context(err_context)?;
+ senders
+ .send_to_screen(ScreenInstruction::WriteToPaneId(
+ bytes,
+ pane_id.into(),
+ Some(NotificationEnd::new(completion_tx)),
+ ))
+ .with_context(err_context)?;
+ },
+ Action::WriteCharsToPaneId { chars, pane_id } => {
+ senders
+ .send_to_screen(ScreenInstruction::ClearScroll(client_id))
+ .with_context(err_context)?;
+ let bytes = chars.into_bytes();
+ senders
+ .send_to_screen(ScreenInstruction::WriteToPaneId(
+ bytes,
+ pane_id.into(),
+ Some(NotificationEnd::new(completion_tx)),
+ ))
+ .with_context(err_context)?;
+ },
Action::SwitchToMode { input_mode } => {
let attrs = &client_attributes;
senders