diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-03-10 20:27:21 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-03-19 15:39:10 +0100 |
commit | c040f3d3e53d6d127bdfafca48a680a5fc3d4351 (patch) | |
tree | 43676ce98427e0bf0ddfc9806b98d3f914e41782 /imag-counter | |
parent | afee9152ed06e7bf5452666551020f6d52d82fdb (diff) |
Add ui for "list" subcommand
Diffstat (limited to 'imag-counter')
-rw-r--r-- | imag-counter/src/ui.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/imag-counter/src/ui.rs b/imag-counter/src/ui.rs index 994bb65e..2e6d18ef 100644 --- a/imag-counter/src/ui.rs +++ b/imag-counter/src/ui.rs @@ -54,6 +54,38 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { .required(true) .help("Create counter with this name"))) + .subcommand(SubCommand::with_name("list") + .about("List counters") + .version("0.1") + .arg(Arg::with_name("name") + .long("name") + .short("n") + .takes_value(true) + .required(false) + .help("List counters with this name (foo/bar and baz/bar would match 'bar')")) + + .arg(Arg::with_name("greater-than") + .long("greater") + .short("g") + .takes_value(true) + .required(false) + .help("List counters which are greater than VALUE")) + + .arg(Arg::with_name("lower-than") + .long("lower") + .short("l") + .takes_value(true) + .required(false) + .help("List counters which are lower than VALUE")) + + .arg(Arg::with_name("equals") + .long("equal") + .short("e") + .takes_value(true) + .required(false) + .help("List counters which equal VALUE")) + ) + .subcommand(SubCommand::with_name("interactive") .about("Interactively count things") .version("0.1") |