diff options
| author | Yacine Hmito <6893840+yacinehmito@users.noreply.github.com> | 2026-03-09 14:55:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-09 14:55:14 +0100 |
| commit | 0172836fda1eb97005ec536571714998f48ad2e2 (patch) | |
| tree | 76aa93a7f7d2bc9e7453a80e2a95af63a63ea68a /zellij-utils/src/ipc/protobuf_conversion.rs | |
| parent | Remove unnecessary winapi features (#4816) (diff) | |
| download | sl0ppij-0172836fda1eb97005ec536571714998f48ad2e2.tar.gz sl0ppij-0172836fda1eb97005ec536571714998f48ad2e2.tar.xz sl0ppij-0172836fda1eb97005ec536571714998f48ad2e2.zip | |
feat(cli): add --pane-id option to dump-screen action (#4598)
* feat(cli): add --pane-id option to dump-screen action
Adds the ability to dump a specific terminal pane's content by passing
`--pane-id <ID>` to the `dump-screen` CLI action. When omitted, the
existing behavior of dumping the focused pane is preserved.
This enables coding agents running inside Zellij to inspect the content
of other panes programmatically, without needing complex workarounds.
Prior art: https://github.com/theslyprofessor/zellij-pane-tracker, whose
design complexity is due to current limitations that this PR addresses.
* address review
* improve man page entry
Diffstat (limited to 'zellij-utils/src/ipc/protobuf_conversion.rs')
| -rw-r--r-- | zellij-utils/src/ipc/protobuf_conversion.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs index 4c8316d2..3551895d 100644 --- a/zellij-utils/src/ipc/protobuf_conversion.rs +++ b/zellij-utils/src/ipc/protobuf_conversion.rs @@ -890,9 +890,11 @@ impl From<crate::input::actions::Action> crate::input::actions::Action::DumpScreen { file_path, include_scrollback, + pane_id, } => ActionType::DumpScreen(DumpScreenAction { file_path, include_scrollback, + pane_id: pane_id.map(|p| p.into()), }), crate::input::actions::Action::DumpLayout => { ActionType::DumpLayout(DumpLayoutAction {}) @@ -1570,6 +1572,7 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Action> Ok(crate::input::actions::Action::DumpScreen { file_path: dump_screen_action.file_path, include_scrollback: dump_screen_action.include_scrollback, + pane_id: dump_screen_action.pane_id.and_then(|p| p.try_into().ok()), }) }, ActionType::DumpLayout(_) => Ok(crate::input::actions::Action::DumpLayout), |
