diff options
author | 哇呜哇呜呀咦耶 <pingao777@gmail.com> | 2023-03-02 00:28:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 17:28:17 +0100 |
commit | c2fb275319bb940cb13da48aa7a67cd611617f5b (patch) | |
tree | 0540919eeba3b9980e0a6c3b078db3a458e6b650 /zellij-utils/src | |
parent | 715ee1109d1d6b389c876653a12c8f2721c4de05 (diff) |
feat(cli): `QueryTabNames` cli action to list all tab names (#2145)
* extend display char in tab
* Add action to list all tab names
* print tab names and remove logs
* change msg name, and handle Log in normal client
* fix log
* resolve code conflict
* change var name
* add snapshot test
* fix failed test case
* restore snapshot
* Revert "restore snapshot"
This reverts commit b97a9512ab106615a1a1e5882392a03a17cdf1a3.
* restore snapshot
* revert snapshot
* fix(layout): various parser and ui fixes (#2191)
* fix(layout): error on nodes outside layout node
* fix(layout): move stacked property to pane
* fix(layout): various stack exceptions
* fix(ui): non-flexible stacked pane titles now take up their full length
* fix(ui): stack titles with no-pane-frames take up their proper length
* style(fmt): rustfmt
* docs(changelog): layout fixes
* fix(messaging): cache hold pane messages by their tab_id if the tab is not ready (#2196)
* fix(messaging): cache hold pane messages by their tab_id if the tab is not ready
* style(fmt): rustfmt
* docs(changelog): open panes fix
* fix(layout): tab focus (#2197)
* fix(layout): tab focus
* style(fmt): rustfmt
* docs(changel0g): tab focus fix
* fix(cli): new-tab now also looks in layout_dir for layouts (#2198)
* fix(cli): the new-tab action now also searches for layouts in the layout dir
* style(fmt): rustfmt
* fix(tests): add missing parameter to cli action
* docs(changelog): new-tab cli layout folder fix
* fix(kdl): new-tab keybind looks in layout_dir for layouts (#2200)
* fix(themes): missing tokyo-night-dark theme
* fix(kdl): new-tab keybind also looks in layout_dir for layouts
* docs(changelog): new-tab keybind layout folder fix
* fix(cli): edit cwd (#2201)
* fix(cli): properly set cwd for edit panes
* fix(layouts): properly set cwd for edit panes
* style(fmt): rustfmt
* docs(changelog0
* fix(layouts): do not relayout twice on auto_layout (#2202)
* fix(layouts): do not relayout twice on auto_layout
* style(fmt): rustfmt
* fix(new-tab): get config parameters from config file (#2203)
* fix(cli): take default shell from config if it exists when opening new tab
* fix(cli): take layout dir from config when opening new tab if it exists
* style(fmt): rustfmt
* docs(changelog): new-tab config parameters
* fix(grid): only use background pending styling when deleting characters (#2204)
* docs(changelog): neovim underline fix
* feat(layouts): exact panes constraint (#2206)
* style(fmt): remove warnings
* fix(swap-layouts): introduce exact panes constraint
* fix(swap-layouts): improve floating pane swap layout ux
* style(fmt): rustfmt
* docs(changelog): exact panes constraint
* fix(pty): report no-cwd for empty path returned from sysinfo (#2213)
* fix(sixel): report pixel size in winsize change ioctl (#2212)
* fix(sixel): report pixel size in winsize change ioctl
* style(fmt): rustfmt
* docs(changelog): various fixes
* style(code): naming
* test(log): adjust query tab names test to look at the log message
* style(fmt): rustfmt
---------
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com>
Diffstat (limited to 'zellij-utils/src')
-rw-r--r-- | zellij-utils/src/cli.rs | 2 | ||||
-rw-r--r-- | zellij-utils/src/errors.rs | 3 | ||||
-rw-r--r-- | zellij-utils/src/input/actions.rs | 3 | ||||
-rw-r--r-- | zellij-utils/src/input/unit/layout_test.rs | 1 | ||||
-rw-r--r-- | zellij-utils/src/ipc.rs | 1 |
5 files changed, 10 insertions, 0 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs index 2733f1c74..3947dfad3 100644 --- a/zellij-utils/src/cli.rs +++ b/zellij-utils/src/cli.rs @@ -366,4 +366,6 @@ pub enum CliAction { }, PreviousSwapLayout, NextSwapLayout, + /// Query all tab names + QueryTabNames, } diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs index 3493f84b7..f1522c1de 100644 --- a/zellij-utils/src/errors.rs +++ b/zellij-utils/src/errors.rs @@ -323,6 +323,7 @@ pub enum ScreenContext { ClearPaneFrameColorOverride, PreviousSwapLayout, NextSwapLayout, + QueryTabNames, } /// Stack call representations corresponding to the different types of [`PtyInstruction`]s. @@ -366,6 +367,7 @@ pub enum ClientContext { SwitchToMode, Connected, ActiveClients, + Log, OwnClientId, StartedParsingStdinQuery, DoneParsingStdinQuery, @@ -385,6 +387,7 @@ pub enum ServerContext { AttachClient, ConnStatus, ActiveClients, + Log, } #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs index 7b7f78c43..b2ec8d828 100644 --- a/zellij-utils/src/input/actions.rs +++ b/zellij-utils/src/input/actions.rs @@ -223,6 +223,8 @@ pub enum Action { ToggleMouseMode, PreviousSwapLayout, NextSwapLayout, + /// Query all tab names + QueryTabNames, } impl Action { @@ -456,6 +458,7 @@ impl Action { }, CliAction::PreviousSwapLayout => Ok(vec![Action::PreviousSwapLayout]), CliAction::NextSwapLayout => Ok(vec![Action::NextSwapLayout]), + CliAction::QueryTabNames => Ok(vec![Action::QueryTabNames]), } } } diff --git a/zellij-utils/src/input/unit/layout_test.rs b/zellij-utils/src/input/unit/layout_test.rs index c8c6c64dc..237cf978c 100644 --- a/zellij-utils/src/input/unit/layout_test.rs +++ b/zellij-utils/src/input/unit/layout_test.rs @@ -1943,6 +1943,7 @@ fn cannot_define_stacked_panes_with_grandchildren_in_pane_template() { assert!(layout.is_err(), "error provided for tab name with space"); } +#[test] fn run_plugin_location_parsing() { let kdl_layout = r#" layout { diff --git a/zellij-utils/src/ipc.rs b/zellij-utils/src/ipc.rs index e76a21bd8..149a157ae 100644 --- a/zellij-utils/src/ipc.rs +++ b/zellij-utils/src/ipc.rs @@ -109,6 +109,7 @@ pub enum ServerToClientMsg { SwitchToMode(InputMode), Connected, ActiveClients(Vec<ClientId>), + Log(Vec<String>), } #[derive(Serialize, Deserialize, Debug, Clone)] |