summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/cli.rs
diff options
context:
space:
mode:
author哇呜哇呜呀咦耶 <pingao777@gmail.com>2023-02-07 22:45:59 +0800
committerGitHub <noreply@github.com>2023-02-07 15:45:59 +0100
commit99e8d56adb50b1b2921d4af01972c4b9fd8b6105 (patch)
tree4dc9da5729cd083c5ff1219aa1b4ec3b3573db15 /zellij-utils/src/cli.rs
parent601eee8bb3e1d57d8a5df2b04d15506bc2aa92eb (diff)
feat(cli): add `GoToTabName` action to switch tab by name (#2120)
* Add `GoToTabName` action to switch tab by name * rm blank file * add --create option * format * add some doc * add test case * format * add test case * change variable name
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r--zellij-utils/src/cli.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index 82c34eecd..1ef43e27f 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -315,6 +315,13 @@ pub enum CliAction {
CloseTab,
/// Go to tab with index [index]
GoToTab { index: u32 },
+ /// Go to tab with name [name]
+ GoToTabName {
+ name: String,
+ /// Create a tab if one does not exist.
+ #[clap(short, long, value_parser)]
+ create: bool,
+ },
/// Renames the focused pane
RenameTab { name: String },
/// Remove a previously set tab name