diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-04-06 11:42:23 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-04-06 11:42:23 +0200 |
commit | ecfdbab9474e73794c3d108979cfdc72682a8e14 (patch) | |
tree | 89179011f7b7ca2fe16972362182f50f4897b11d /libimagentrylist | |
parent | 9a9b7fcc58c98ec4dc988267fe53e272f2995f53 (diff) |
Add default arguments for builtin lister backends
Diffstat (limited to 'libimagentrylist')
-rw-r--r-- | libimagentrylist/src/cli.rs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libimagentrylist/src/cli.rs b/libimagentrylist/src/cli.rs index c3823550..b1253c68 100644 --- a/libimagentrylist/src/cli.rs +++ b/libimagentrylist/src/cli.rs @@ -5,9 +5,46 @@ pub fn build_list_cli_component<'a, 'b>() -> App<'a, 'b> { .author("Matthias Beyer <mail@beyermatthias.de>") .version("0.1") .about("List entries") + + .arg(Arg::with_name(list_backend_line()) + .short("l") + .long("line") + .takes_value(false) + .required(false) + .multiple(false) + .help("Use backend: Line")) + + .arg(Arg::with_name(list_backend_path()) + .short("p") + .long("path") + .takes_value(false) + .required(false) + .multiple(false) + .help("Use backend: Path")) + + .arg(Arg::with_name(list_backend_path_absolute()) + .short("P") + .long("path-absolute") + .takes_value(false) + .required(false) + .multiple(false) + .help("Use backend: Path (absolute)")) + } pub fn list_subcommand_name() -> &'static str { "list" } +pub fn list_backend_line() -> &'static str { + "line" +} + +pub fn list_backend_path() -> &'static str { + "path" +} + +pub fn list_backend_path_absolute() -> &'static str { + "path-absolute" +} + |