diff --git a/src/habitmgr.rs b/src/habitmgr.rs index 6afd79f..5dc3e90 100644 --- a/src/habitmgr.rs +++ b/src/habitmgr.rs @@ -142,7 +142,7 @@ impl HabitMgr self.export_habits(); } - pub fn list(&mut self, _all:bool, _verbose:bool) + pub fn list(&mut self, _all:bool) { self.import_habits(); if self.habits.is_empty() diff --git a/src/main.rs b/src/main.rs index c6b0857..a20a5fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,13 +42,15 @@ enum Command #[structopt(alias = "a")] Add { - #[structopt(help = "name of the new habit")] + #[structopt(help = "Name of the new habit")] name:String, - #[structopt(long, short, default_value = "mon,tue,wed,thu,fri,sat,sun")] + #[structopt(long, short, help = "Days the new habit is active", + default_value = "mon,tue,wed,thu,fri,sat,sun")] days:String, - #[structopt(long)] + #[structopt(long, help = "Assign habit as a bad habit (negative points)")] bad:bool, - #[structopt(short, long, default_value = "5")] + #[structopt(short, long, help = "Weight/priority of the new habit", + default_value = "5")] weight:u8, }, Commit { }, @@ -59,31 +61,29 @@ enum Command }, #[structopt(alias = "i")] Info { + #[structopt(help = "ID of the habit to show information for")] id:usize, }, #[structopt(alias = "ls")] List { - #[structopt(short, long, help = "list all active habits")] + #[structopt(short, long, help = "List all active habits")] all:bool, - #[structopt(short, long, help = "show UUIDs")] - verbose:bool, }, #[structopt(alias = "mod")] Modify { #[structopt(help = "ID of the habit to modify")] id:usize, - #[structopt(short, long)] + #[structopt(short, long, help = "New name for the habit")] name:Option, - #[structopt(short, long)] + #[structopt(short, long, help = "New weight of the habit")] weight:Option, - #[structopt(long, short)] + #[structopt(long, short, help = "New days the habit is active")] days:Option, - #[structopt(long)] + #[structopt(long, help = "Toggle the 'bad' value of the habit")] toggle_bad:bool, }, - #[structopt(alias = "stats")] - Statistics { }, + Stats { }, } fn main() @@ -112,7 +112,7 @@ fn main() match opts.cmd { - None => hmgr.list(false, false), + None => hmgr.list(false), Some(c) => match c { @@ -122,8 +122,8 @@ fn main() hmgr.delete(id), Command::Info { id } => hmgr.habit_info(id), - Command::List { all, verbose } => - hmgr.list(all, verbose), + Command::List { all } => + hmgr.list(all), Command::Modify { id, name, weight, days, toggle_bad } => hmgr.modify(id, name, toggle_bad, weight, days), _ => todo!(),