Make "today" the default command
This commit is contained in:
parent
0fa1ae28f8
commit
404d839310
2 changed files with 5 additions and 3 deletions
|
@ -68,7 +68,8 @@ fn main() {
|
||||||
ui::build_ui);
|
ui::build_ui);
|
||||||
|
|
||||||
|
|
||||||
rt.cli()
|
let _ = rt
|
||||||
|
.cli()
|
||||||
.subcommand_name()
|
.subcommand_name()
|
||||||
.map(|name| {
|
.map(|name| {
|
||||||
debug!("Call {}", name);
|
debug!("Call {}", name);
|
||||||
|
@ -83,7 +84,8 @@ fn main() {
|
||||||
exit(1)
|
exit(1)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
.unwrap_or_else(|| today(&rt));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create(rt: &Runtime) {
|
fn create(rt: &Runtime) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
)
|
)
|
||||||
|
|
||||||
.subcommand(SubCommand::with_name("today")
|
.subcommand(SubCommand::with_name("today")
|
||||||
.about("List habits which are due today")
|
.about("List habits which are due today (default command)")
|
||||||
.version("0.1")
|
.version("0.1")
|
||||||
.arg(Arg::with_name("today-show-next-n")
|
.arg(Arg::with_name("today-show-next-n")
|
||||||
.long("show")
|
.long("show")
|
||||||
|
|
Loading…
Reference in a new issue