Skip to content

Commit 45d2e81

Browse files
committed
Use lowercase arg value names
Lowercase value names is the dominant convention in git's man pages, so StGit attaches to that convention too. Also use bracketed form in help strings, e.g. "Help for <value>".
1 parent 9d1f20b commit 45d2e81

28 files changed

+89
-89
lines changed

src/argset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ lazy_static! {
1111
.short('b')
1212
.help("Use BRANCH instead of current branch")
1313
.takes_value(true)
14-
.value_name("BRANCH")
14+
.value_name("branch")
1515
.value_hint(ValueHint::Other);
1616

1717
/// The `--keep/-k` option.
@@ -32,7 +32,7 @@ lazy_static! {
3232
.takes_value(true)
3333
.allow_hyphen_values(true)
3434
.multiple_occurrences(true)
35-
.value_name("OPTIONS")
35+
.value_name("options")
3636
.value_hint(ValueHint::Other);
3737
}
3838

src/cmd/completion/bash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ pub(super) fn command() -> clap::Command<'static> {
1515
clap::Arg::new("output")
1616
.long("output")
1717
.short('o')
18-
.help("Output completion script to PATH")
19-
.value_name("PATH")
18+
.help("Output completion script to <path>")
19+
.value_name("path")
2020
.value_hint(clap::ValueHint::FilePath)
2121
.allow_invalid_utf8(true),
2222
)

src/cmd/completion/fish.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ pub(super) fn command() -> clap::Command<'static> {
1515
clap::Arg::new("output")
1616
.long("output")
1717
.short('o')
18-
.help("Output completion script to PATH")
19-
.value_name("PATH")
18+
.help("Output completion script to <path>")
19+
.value_name("path")
2020
.value_hint(clap::ValueHint::FilePath)
2121
.allow_invalid_utf8(true),
2222
)

src/cmd/completion/man.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ pub(super) fn command() -> clap::Command<'static> {
2424
clap::Arg::new("output")
2525
.long("output")
2626
.short('o')
27-
.help("Output man pages to DIR")
28-
.value_name("DIR")
27+
.help("Output man pages to <dir>")
28+
.value_name("dir")
2929
.value_hint(clap::ValueHint::DirPath)
3030
.allow_invalid_utf8(true),
3131
)

src/cmd/completion/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ fn make() -> clap::Command<'static> {
4040
clap::Arg::new("output")
4141
.long("output")
4242
.short('o')
43-
.help("Output to PATH")
43+
.help("Output to <path>")
4444
.global(true)
45-
.value_name("PATH")
45+
.value_name("path")
4646
.value_hint(clap::ValueHint::FilePath)
4747
.allow_invalid_utf8(true),
4848
)

src/cmd/completion/zsh.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ pub(super) fn command() -> clap::Command<'static> {
1111
clap::Arg::new("output")
1212
.long("output")
1313
.short('o')
14-
.help("Output completion script to PATH")
15-
.value_name("PATH")
14+
.help("Output completion script to <path>")
15+
.value_name("path")
1616
.value_hint(clap::ValueHint::FilePath)
1717
.allow_invalid_utf8(true),
1818
)

src/cmd/email/format.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub(super) fn command() -> clap::Command<'static> {
6767
.help("Extra arguments passed to 'git format-patch'")
6868
.last(true)
6969
.allow_hyphen_values(true)
70-
.value_name("GIT-OPTIONS"),
70+
.value_name("git-options"),
7171
)
7272
.arg(&*crate::argset::BRANCH_ARG)
7373
.arg(
@@ -116,16 +116,16 @@ lazy_static! {
116116
.conflicts_with("numbered"),
117117
Arg::new("start-number")
118118
.long("start-number")
119-
.help("Start numbering at N instead of 1")
120-
.value_name("N")
119+
.help("Start numbering at <n> instead of 1")
120+
.value_name("n")
121121
.takes_value(true),
122122
Arg::new("reroll-count")
123123
.long("reroll-count")
124124
.short('v')
125-
.help("Mark the series as the Nth reroll")
125+
.help("Mark the series as the <n>th reroll")
126126
.long_help(
127-
"Mark the series as the <N>-th iteration of the topic. The output \
128-
filenames have \"v<N>\" prepended to them, and the subject prefix \
127+
"Mark the series as the <n>-th iteration of the topic. The output \
128+
filenames have \"v<n>\" prepended to them, and the subject prefix \
129129
(\"PATCH\" by default, but configurable via the --subject-prefix \
130130
option) has ` v<N>` appended to it. E.g. --reroll-count=4 may produce \
131131
v4-0001-add-makefile.patch file that has \"Subject: [PATCH v4 1/20] \
@@ -135,7 +135,7 @@ lazy_static! {
135135
range-diff/interdiff with the previous version does not state exactly \
136136
which version the new interation is compared against.",
137137
)
138-
.value_name("N")
138+
.value_name("n")
139139
.takes_value(true),
140140
Arg::new("rfc")
141141
.long("rfc")
@@ -414,7 +414,7 @@ lazy_static! {
414414
git-range-diff(1)) for details.",
415415
)
416416
.takes_value(true)
417-
.value_name("N")
417+
.value_name("n")
418418
.forbid_empty_values(true),
419419
// NO --from
420420
// NO --no-add-header

src/cmd/email/send.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub(super) fn command() -> clap::Command<'static> {
7272
.help("Extra arguments passed to 'git send-email'")
7373
.last(true)
7474
.allow_hyphen_values(true)
75-
.value_name("GIT-OPTIONS"),
75+
.value_name("git-options"),
7676
)
7777
.arg(&*crate::argset::BRANCH_ARG)
7878
.arg(
@@ -310,14 +310,14 @@ lazy_static! {
310310
.conflicts_with("numbered"),
311311
Arg::new("start-number")
312312
.long("start-number")
313-
.help("Start numbering at N instead of 1")
314-
.value_name("N")
313+
.help("Start numbering at <n> instead of 1")
314+
.value_name("n")
315315
.takes_value(true),
316316
Arg::new("reroll-count")
317317
.long("reroll-count")
318318
.short('v')
319-
.help("Mark the series as the Nth reroll")
320-
.value_name("N")
319+
.help("Mark the series as the <n>th reroll")
320+
.value_name("n")
321321
.takes_value(true),
322322
Arg::new("rfc")
323323
.long("rfc")

src/cmd/export.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ fn make() -> clap::Command<'static> {
7171
Arg::new("dir")
7272
.long("dir")
7373
.short('d')
74-
.help("Export patches to DIR instead of the default")
75-
.value_name("DIR")
74+
.help("Export patches to <dir> instead of the default")
75+
.value_name("dir")
7676
.value_hint(clap::ValueHint::DirPath)
7777
.allow_invalid_utf8(true),
7878
)
@@ -86,10 +86,10 @@ fn make() -> clap::Command<'static> {
8686
Arg::new("extension")
8787
.long("extension")
8888
.short('e')
89-
.help("Suffix patch file names with \".<EXTENSION>\"")
89+
.help("Suffix patch file names with \".<ext>\"")
9090
.conflicts_with("patch")
9191
.takes_value(true)
92-
.value_name("EXTENSION"),
92+
.value_name("ext"),
9393
)
9494
.arg(
9595
Arg::new("numbered")
@@ -101,8 +101,8 @@ fn make() -> clap::Command<'static> {
101101
Arg::new("template")
102102
.long("template")
103103
.short('t')
104-
.help("Use FILE as template")
105-
.value_name("FILE")
104+
.help("Use <file> as template")
105+
.value_name("file")
106106
.value_hint(clap::ValueHint::FilePath)
107107
.allow_invalid_utf8(true),
108108
)

src/cmd/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ fn make() -> clap::Command<'static> {
5858
Arg::new("series")
5959
.long("series")
6060
.short('s')
61-
.help("Rearrange according to a series FILE")
62-
.value_name("FILE")
61+
.help("Rearrange according to a series <file>")
62+
.value_name("file")
6363
.value_hint(clap::ValueHint::FilePath)
6464
.allow_invalid_utf8(true)
6565
.forbid_empty_values(true),

0 commit comments

Comments
 (0)