Add value_name() call in ui specification code

This commit is contained in:
Matthias Beyer 2016-06-08 14:11:13 +02:00
parent 6a8a8150fd
commit 7d395dd87a

View file

@ -13,14 +13,16 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("f")
.takes_value(true)
.required(true)
.help("Link from this entry"))
.help("Link from this entry")
.value_name("ENTRY"))
.arg(Arg::with_name("to")
.long("to")
.short("t")
.takes_value(true)
.required(true)
.multiple(true)
.help("Link to this entries"))
.help("Link to this entries")
.value_name("ENTRIES"))
)
.subcommand(SubCommand::with_name("remove")
@ -31,14 +33,16 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("f")
.takes_value(true)
.required(true)
.help("Remove Link from this entry"))
.help("Remove Link from this entry")
.value_name("ENTRY"))
.arg(Arg::with_name("to")
.long("to")
.short("t")
.takes_value(true)
.required(true)
.multiple(true)
.help("Remove links to these entries"))
.help("Remove links to these entries")
.value_name("ENTRIES"))
)
.arg(Arg::with_name("list")
@ -46,7 +50,8 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("l")
.takes_value(true)
.required(false)
.help("List links to this entry"))
.help("List links to this entry")
.value_name("ENTRY"))
)
.subcommand(SubCommand::with_name("external")
.about("Add and remove external links")
@ -57,14 +62,16 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("i")
.takes_value(true)
.required(true)
.help("Modify external link of this entry"))
.help("Modify external link of this entry")
.value_name("ENTRY"))
.arg(Arg::with_name("add")
.long("add")
.short("a")
.takes_value(true)
.required(false)
.help("Add this URI as external link"))
.help("Add this URI as external link")
.value_name("URI"))
.arg(Arg::with_name("remove")
.long("remove")
@ -78,7 +85,8 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("s")
.takes_value(true)
.required(false)
.help("Set these URIs as external link (seperate by comma)"))
.help("Set these URIs as external link (seperate by comma)")
.value_name("URIs"))
.arg(Arg::with_name("list")
.long("list")
@ -93,4 +101,3 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
)
}