summaryrefslogtreecommitdiff
path: root/src/cmds/arg/workspace_sheet.rs
diff options
context:
space:
mode:
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,
+}