From 6a4acffd73eb51fcdaca701304482f9fe95b3612 Mon Sep 17 00:00:00 2001 From: Denis Evsyukov Date: Sat, 7 Mar 2020 18:57:10 +0300 Subject: [+] help --- src/main.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 88027c7..283fa69 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,8 +36,17 @@ fn main() { }; if matches.opt_present("h") { - let brief = "t is for people that want do things, not organize their tasks"; - opts.usage(&brief); + let brief = "t is for people that want do things, not organize their tasks + +Usage: t [-t DIR] [-l LIST] [options] [TEXT]"; + print!("{}", opts.usage(&brief)); return; } + + let input = if !matches.free.is_empty() { + matches.free[0].clone() + } else { + "Print tasks".to_string() + }; + println!("{}", input); } -- cgit v1.2.3