summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-08-27 23:41:04 -0400
committerBen Morrison <ben@gbmor.dev>2019-08-27 23:41:04 -0400
commit8d50587b8172e1d8bb2b104f1ad25dc563532e6f (patch)
treefdfd064784f1d51a723078713d5558e69089fc0f /src
parent58ca6649a32af34cb8012bd87c6772d6a3655742 (diff)
downloadclinte-8d50587b8172e1d8bb2b104f1ad25dc563532e6f.tar.gz
made list the default behavior
Diffstat (limited to 'src')
-rw-r--r--src/main.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 4bd069b..48c6802 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,7 +13,7 @@ fn main() {
         .version(clap::crate_version!())
         .author("Ben Morrison (gbmor)")
         .about("Command-line community notices system")
-        .subcommand(clap::SubCommand::with_name("list").about("Display notices"))
+        //.subcommand(clap::SubCommand::with_name("list").about("Display notices"))
         .subcommand(clap::SubCommand::with_name("post").about("Post a new notice"))
         /*.subcommand(
             clap::SubCommand::with_name("update")
@@ -38,16 +38,14 @@ fn main() {
 
     info!("Startup completed in {:?}ms", start.elapsed().as_millis());
 
-    if let Some(_) = arg_matches.subcommand_matches("list") {
-        info!("Listing notes...");
-        list_matches(&db);
-        process::exit(0);
-    } else if let Some(_) = arg_matches.subcommand_matches("post") {
+    if let Some(_) = arg_matches.subcommand_matches("post") {
         info!("New post...");
         post(&db);
         list_matches(&db);
         process::exit(0);
     }
+
+    list_matches(&db);
 }
 
 fn list_matches(db: &db::Conn) {