From 99e8d56adb50b1b2921d4af01972c4b9fd8b6105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=87=E5=91=9C=E5=93=87=E5=91=9C=E5=91=80=E5=92=A6?= =?UTF-8?q?=E8=80=B6?= Date: Tue, 7 Feb 2023 22:45:59 +0800 Subject: 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 --- zellij-utils/src/cli.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'zellij-utils/src/cli.rs') 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 -- cgit v1.2.3