From 74bc8902be593796eb6292151e08374072766e3e Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 18 Mar 2026 22:50:03 +0800 Subject: Add workspace sheet command with help and localization --- src/cmds/arg/workspace_sheet.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/cmds/arg/workspace_sheet.rs (limited to 'src/cmds/arg/workspace_sheet.rs') diff --git a/src/cmds/arg/workspace_sheet.rs b/src/cmds/arg/workspace_sheet.rs new file mode 100644 index 0000000..7cf65e4 --- /dev/null +++ b/src/cmds/arg/workspace_sheet.rs @@ -0,0 +1,22 @@ +// Why not directly design new, delete, print_path as Option? +// Because the former would only allow the following syntax: +// jvn workspace sheet --new sheet +// But by separating name and operation, it can simultaneously support: +// jvn workspace sheet sheet --new + +#[derive(clap::Parser)] +pub struct JVWorkspaceSheetArgument { + pub name: Option, + + #[arg(short = 'n', long = "new")] + pub new: bool, + + #[arg(short = 'd', long = "delete")] + pub delete: bool, + + #[arg(short = 'A', long = "list-all")] + pub list_all: bool, + + #[arg(short = 'p', long = "print-path")] + pub print_path: bool, +} -- cgit