summaryrefslogtreecommitdiffstats
path: root/imag-view
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-06-08 14:11:13 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-06-08 14:11:13 +0200
commit4e987e32cf157d8c26bb0514b05a2e5464741cca (patch)
treeb54e7f7088f678d18570bd358b8cff133afe5303 /imag-view
parent807f734d383b2983ac6885c1cbd461ee2fea66e1 (diff)
Add value_name() call in ui specification code
Diffstat (limited to 'imag-view')
-rw-r--r--imag-view/src/ui.rs23
1 files changed, 14 insertions, 9 deletions
diff --git a/imag-view/src/ui.rs b/imag-view/src/ui.rs
index 619e4f27..54979f1f 100644
--- a/imag-view/src/ui.rs
+++ b/imag-view/src/ui.rs
@@ -7,14 +7,16 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("i")
.takes_value(true)
.required(true)
- .help("View this entry at this store path"))
+ .help("View this entry at this store path")
+ .value_name("ID"))
.arg(Arg::with_name("version")
.long("version")
.short("V")
.takes_value(true)
.required(false)
- .help("View this version (youngest if not specified)"))
+ .help("View this version (youngest if not specified)")
+ .value_name("VERSION"))
.arg(Arg::with_name("versions")
.long("versions")
@@ -71,21 +73,24 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("b")
.takes_value(true) // optional, which browser
.required(false)
- .help("View content in $BROWSER (fails if no env variable $BROWSER)"))
+ .help("View content in $BROWSER (fails if no env variable $BROWSER)")
+ .value_name("BROWSER"))
.arg(Arg::with_name("view-in-texteditor")
.long("editor")
.short("e")
.takes_value(true) // optional, which editor
.required(false)
- .help("View content in $EDITOR"))
+ .help("View content in $EDITOR")
+ .value_name("EDITOR"))
.arg(Arg::with_name("view-in-custom")
.long("custom")
.short("c")
.takes_value(true) // non-optional, call-string
.required(false)
- .help("View content in custom program, for example 'libreoffice %e', replace '%e' with entry path"))
+ .help("View content in custom program, for example 'libreoffice %e', replace '%e' with entry path")
+ .value_name("PROGRAM"))
.group(ArgGroup::with_name("viewer")
.args(&["view-in-stdout",
@@ -105,15 +110,15 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("f")
.takes_value(true) // "markdown" or "textile" or "restructuredtex"
.required(true)
- .help("Compile from"))
+ .help("Compile from")
+ .value_name("FORMAT"))
.arg(Arg::with_name("to")
.long("to")
.short("t")
.takes_value(true) // "html" or "HTML" or ... json maybe?
.required(true)
- .help("Compile to"))
+ .help("Compile to")
+ .value_name("FORMAT"))
)
}
-
-