diff --git a/src/formatters.rs b/src/formatters.rs index 0872c7c..8c79bb4 100644 --- a/src/formatters.rs +++ b/src/formatters.rs @@ -36,6 +36,7 @@ impl Formatter { Formatter::Text => text::print_formatted(entries, out, now, ids, term_width)?, Formatter::Csv => csv::print_formatted(entries, out, ids)?, Formatter::Custom(name) => { + panic!("attempted custom formatter with name {} which is not implemented", name); } } @@ -51,6 +52,7 @@ impl FromStr for Formatter { Ok(match &*lower { "text" => Formatter::Text, + "csv" => Formatter::Csv, custom_format => Formatter::Custom(custom_format.into()), }) } diff --git a/src/main.rs b/src/main.rs index 4085719..4c3ef1c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -123,7 +123,7 @@ fn main() { .arg(Arg::with_name("format") .short("f").long("format") .takes_value(true).value_name("FORMAT").default_value("text") - .help("The output format. Valid built-in formats are ical, csv, json, ids, factor, and text. Documentation on defining custom formats can be found in the README included in this distribution.")) + .help("The output format. Valid built-in formats are ical, csv, json, ids, factor, and text. Documentation on defining custom formats can be found in the README included in this distribution.")) .arg(Arg::with_name("grep") .short("g").long("grep") .takes_value(true).value_name("REGEXP")