summary refs log tree commit diff stats
path: root/src/conf.rs
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-05-26 23:47:52 -0400
committerBen Morrison <ben@gbmor.dev>2020-05-26 23:54:20 -0400
commit99c5537622344ecba5a4c7d23a9bc227d9bd7fe3 (patch)
treee5d75ac91f75ebdef6e076825fbfe23e8fb1557c /src/conf.rs
parent896f987f2705d1c5152d6c0741c377e3612f048a (diff)
downloadclinte-99c5537622344ecba5a4c7d23a9bc227d9bd7fe3.tar.gz
post ID can be specified as an argument. if absent, user will be prompted
Diffstat (limited to 'src/conf.rs')
-rw-r--r--src/conf.rs22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/conf.rs b/src/conf.rs
index dd3b298..2a26a92 100644
--- a/src/conf.rs
+++ b/src/conf.rs
@@ -17,7 +17,25 @@ fn get_config() -> clap::ArgMatches<'static> {
                 .help("Verbose logging"),
         )
         .subcommand(clap::SubCommand::with_name("post").about("Post a new notice"))
-        .subcommand(clap::SubCommand::with_name("update").about("Update a notice you've posted"))
-        .subcommand(clap::SubCommand::with_name("delete").about("Delete a notice you've posted"))
+        .subcommand(
+            clap::SubCommand::with_name("update")
+                .about("Update a notice you've posted")
+                .arg(
+                    Arg::with_name("id")
+                        .help("Numeric ID of the post to update")
+                        .value_name("ID")
+                        .takes_value(true),
+                ),
+        )
+        .subcommand(
+            clap::SubCommand::with_name("delete")
+                .about("Delete a notice you've posted")
+                .arg(
+                    Arg::with_name("id")
+                        .help("Numeric ID of the post to delete")
+                        .value_name("ID")
+                        .takes_value(true),
+                ),
+        )
         .get_matches()
 }