implement cli help

This commit is contained in:
Dustin J. Mitchell 2020-12-20 18:42:21 -05:00
parent 2c579b9f01
commit 6b550e7516
7 changed files with 323 additions and 53 deletions

View file

@ -1,14 +1,10 @@
use crate::usage::Usage;
use failure::Fallible;
use std::io;
pub(crate) fn execute(command_name: String, summary: bool) -> Fallible<()> {
println!(
"TaskChampion {}: Personal task-tracking",
env!("CARGO_PKG_VERSION")
);
if !summary {
println!();
println!("USAGE: {} [args]\n(help output TODO)", command_name); // TODO
}
let usage = Usage::new();
usage.write_help(io::stdout(), command_name, summary)?;
Ok(())
}