Make "urls" positional argument

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-05-18 01:55:59 +02:00
parent 85f8082cbe
commit c4aa8dd5d5

View file

@ -35,14 +35,13 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.value_name("COLLECTION") .value_name("COLLECTION")
.help("Add to this collection, if not specified default from config will be used")) .help("Add to this collection, if not specified default from config will be used"))
.arg(Arg::with_name("urls") .arg(Arg::with_name("urls")
.long("urls") .index(1)
.short("u")
.takes_value(true) .takes_value(true)
.required(true) .required(true)
.multiple(true) .multiple(true)
.value_name("URL") .value_name("URL")
.validator(is_url) .validator(is_url)
.help("Add this URL, multiple possible")) .help("Add this URL(s)"))
) )
.subcommand(SubCommand::with_name("remove") .subcommand(SubCommand::with_name("remove")
@ -57,14 +56,13 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.value_name("COLLECTION") .value_name("COLLECTION")
.help("Remove from this collection, if not specified default from config will be used")) .help("Remove from this collection, if not specified default from config will be used"))
.arg(Arg::with_name("urls") .arg(Arg::with_name("urls")
.long("urls") .index(1)
.short("u")
.takes_value(true) .takes_value(true)
.required(true) .required(true)
.multiple(true) .multiple(true)
.value_name("URL") .value_name("URL")
.validator(is_url) .validator(is_url)
.help("Remove these urls, regex supported")) .help("Remove this url(s)"))
) )
// .subcommand(SubCommand::with_name("open") // .subcommand(SubCommand::with_name("open")