Add ui for "list" subcommand

This commit is contained in:
Matthias Beyer 2016-03-10 20:27:21 +01:00
parent afee9152ed
commit c040f3d3e5

View file

@ -54,6 +54,38 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.required(true) .required(true)
.help("Create counter with this name"))) .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") .subcommand(SubCommand::with_name("interactive")
.about("Interactively count things") .about("Interactively count things")
.version("0.1") .version("0.1")