summaryrefslogtreecommitdiff
path: root/src/cmds/arg/workspace_sheet.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-18 22:50:03 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-18 22:50:03 +0800
commit74bc8902be593796eb6292151e08374072766e3e (patch)
treef3de024bf06753649ff2a51587ee5e54a1c92435 /src/cmds/arg/workspace_sheet.rs
parent5372793a49567dcba7315bf8e7bc5a1cab2d5a76 (diff)
Add workspace sheet command with help and localization
Diffstat (limited to 'src/cmds/arg/workspace_sheet.rs')
-rw-r--r--src/cmds/arg/workspace_sheet.rs22
1 files changed, 22 insertions, 0 deletions
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<String>?
+// 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<String>,
+
+ #[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,
+}