Add default arguments for builtin lister backends
This commit is contained in:
parent
9a9b7fcc58
commit
ecfdbab947
1 changed files with 37 additions and 0 deletions
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue