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
1 changed files with 4 additions and 6 deletions

View File

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