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/tests/roundtrip_tests.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/tests/roundtrip_tests.rs')
| -rw-r--r-- | zellij-utils/src/ipc/tests/roundtrip_tests.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs index aee81757..8b018c16 100644 --- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs +++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs @@ -875,6 +875,7 @@ fn test_client_messages() { action: Action::DumpScreen { file_path: "/path/to/file".to_owned(), include_scrollback: false, + pane_id: None, }, terminal_id: Some(1), client_id: Some(100), @@ -884,6 +885,17 @@ fn test_client_messages() { action: Action::DumpScreen { file_path: "/path/to/file".to_owned(), include_scrollback: true, + pane_id: None, + }, + terminal_id: Some(1), + client_id: Some(100), + is_cli_client: true, + }); + test_client_roundtrip!(ClientToServerMsg::Action { + action: Action::DumpScreen { + file_path: "/path/to/file".to_owned(), + include_scrollback: true, + pane_id: Some(PaneId::Terminal(5)), }, terminal_id: Some(1), client_id: Some(100), |
