From 75b6c893acf9df6c3cecc8528f3c17e110378336 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Thu, 4 Feb 2016 13:46:11 +0100 Subject: Re-add infer-data functionality --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 11f007f..df4d790 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,6 +50,10 @@ fn main() { .takes_value(true) .long("date") .short("d")) + .arg(Arg::with_name("infer_date") + .help("Try to use the filename as date for the current log") + .global(true) + .long("infer-date")) .arg(Arg::with_name("channel") .help("Set a channel for the current log") .global(true) @@ -107,6 +111,7 @@ fn main() { ("seen", Some(args)) => app::seen::seen(args), ("sort", Some(args)) => app::sort::sort(args), ("dedup", Some(args)) => app::dedup::dedup(args), - _ => panic!("Unimplemented subcommand, this is a bug") + (sc, _) if !sc.is_empty() => panic!("Unimplemented subcommand `{}`, this is a bug", sc), + _ => () } } -- cgit v1.2.3