Skip to content

Commit 92cb005

Browse files
committed
Bring additional help section style in line with clap 4
1 parent d040b90 commit 92cb005

17 files changed

+47
-47
lines changed

src/cli/help.rs

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub(crate) static RUSTUP_HELP: &str = r"DISCUSSION:
1+
pub(crate) static RUSTUP_HELP: &str = r"Discussion:
22
Rustup installs The Rust Programming Language from the official
33
release channels, enabling you to easily switch between stable,
44
beta, and nightly compilers and keep them updated. It makes
@@ -8,7 +8,7 @@ pub(crate) static RUSTUP_HELP: &str = r"DISCUSSION:
88
If you are new to Rust consider running `rustup doc --book` to
99
learn Rust.";
1010

11-
pub(crate) static SHOW_HELP: &str = r"DISCUSSION:
11+
pub(crate) static SHOW_HELP: &str = r"Discussion:
1212
Shows the name of the active toolchain and the version of `rustc`.
1313
1414
If the active toolchain has installed support for additional
@@ -17,7 +17,7 @@ pub(crate) static SHOW_HELP: &str = r"DISCUSSION:
1717
If there are multiple toolchains installed then all installed
1818
toolchains are listed as well.";
1919

20-
pub(crate) static SHOW_ACTIVE_TOOLCHAIN_HELP: &str = r"DISCUSSION:
20+
pub(crate) static SHOW_ACTIVE_TOOLCHAIN_HELP: &str = r"Discussion:
2121
Shows the name of the active toolchain.
2222
2323
This is useful for figuring out the active tool chain from
@@ -26,24 +26,24 @@ pub(crate) static SHOW_ACTIVE_TOOLCHAIN_HELP: &str = r"DISCUSSION:
2626
You should use `rustc --print sysroot` to get the sysroot, or
2727
`rustc --version` to get the toolchain version.";
2828

29-
pub(crate) static UPDATE_HELP: &str = r"DISCUSSION:
29+
pub(crate) static UPDATE_HELP: &str = r"Discussion:
3030
With no toolchain specified, the `update` command updates each of
3131
the installed toolchains from the official release channels, then
3232
updates rustup itself.
3333
3434
If given a toolchain argument then `update` updates that
3535
toolchain, the same as `rustup toolchain install`.";
3636

37-
pub(crate) static INSTALL_HELP: &str = r"DISCUSSION:
37+
pub(crate) static INSTALL_HELP: &str = r"Discussion:
3838
Installs a specific rust toolchain.
3939
4040
The 'install' command is an alias for 'rustup update <toolchain>'.";
4141

42-
pub(crate) static DEFAULT_HELP: &str = r"DISCUSSION:
42+
pub(crate) static DEFAULT_HELP: &str = r"Discussion:
4343
Sets the default toolchain to the one specified. If the toolchain
4444
is not already installed then it is installed first.";
4545

46-
pub(crate) static TOOLCHAIN_HELP: &str = r"DISCUSSION:
46+
pub(crate) static TOOLCHAIN_HELP: &str = r"Discussion:
4747
Many `rustup` commands deal with *toolchains*, a single
4848
installation of the Rust compiler. `rustup` supports multiple
4949
types of toolchains. The most basic track the official release
@@ -85,7 +85,7 @@ pub(crate) static TOOLCHAIN_HELP: &str = r"DISCUSSION:
8585
often used for developing Rust itself. For more information see
8686
`rustup toolchain help link`.";
8787

88-
pub(crate) static TOOLCHAIN_LINK_HELP: &str = r"DISCUSSION:
88+
pub(crate) static TOOLCHAIN_LINK_HELP: &str = r"Discussion:
8989
'toolchain' is the custom name to be assigned to the new toolchain.
9090
Any name is permitted as long as:
9191
- it does not include '/' or '\' except as the last character
@@ -106,7 +106,7 @@ pub(crate) static TOOLCHAIN_LINK_HELP: &str = r"DISCUSSION:
106106
If you now compile a crate in the current directory, the custom
107107
toolchain 'latest-stage1' will be used.";
108108

109-
pub(crate) static OVERRIDE_HELP: &str = r"DISCUSSION:
109+
pub(crate) static OVERRIDE_HELP: &str = r"Discussion:
110110
Overrides configure Rustup to use a specific toolchain when
111111
running in a specific directory.
112112
@@ -127,14 +127,14 @@ pub(crate) static OVERRIDE_HELP: &str = r"DISCUSSION:
127127
override and use the default toolchain again, `rustup override
128128
unset`.";
129129

130-
pub(crate) static OVERRIDE_UNSET_HELP: &str = r"DISCUSSION:
130+
pub(crate) static OVERRIDE_UNSET_HELP: &str = r"Discussion:
131131
If `--path` argument is present, removes the override toolchain
132132
for the specified directory. If `--nonexistent` argument is
133133
present, removes the override toolchain for all nonexistent
134134
directories. Otherwise, removes the override toolchain for the
135135
current directory.";
136136

137-
pub(crate) static RUN_HELP: &str = r"DISCUSSION:
137+
pub(crate) static RUN_HELP: &str = r"Discussion:
138138
Configures an environment to use the given toolchain and then runs
139139
the specified program. The command may be any program, not just
140140
rustc or cargo. This can be used for testing arbitrary toolchains
@@ -149,14 +149,14 @@ pub(crate) static RUN_HELP: &str = r"DISCUSSION:
149149
150150
$ rustup run nightly cargo build";
151151

152-
pub(crate) static DOC_HELP: &str = r"DISCUSSION:
152+
pub(crate) static DOC_HELP: &str = r"Discussion:
153153
Opens the documentation for the currently active toolchain with
154154
the default browser.
155155
156156
By default, it opens the documentation index. Use the various
157157
flags to open specific pieces of documentation.";
158158

159-
pub(crate) static COMPLETIONS_HELP: &str = r"DISCUSSION:
159+
pub(crate) static COMPLETIONS_HELP: &str = r"Discussion:
160160
Enable tab completion for Bash, Fish, Zsh, or PowerShell
161161
The script is output on `stdout`, allowing one to re-direct the
162162
output to the file of their choosing. Where you place the file
@@ -167,7 +167,7 @@ pub(crate) static COMPLETIONS_HELP: &str = r"DISCUSSION:
167167
Here are some common set ups for the three supported shells under
168168
Unix and similar operating systems (such as GNU/Linux).
169169
170-
BASH:
170+
Bash:
171171
172172
Completion files are commonly stored in `/etc/bash_completion.d/` for
173173
system-wide commands, but can be stored in
@@ -180,15 +180,15 @@ pub(crate) static COMPLETIONS_HELP: &str = r"DISCUSSION:
180180
This installs the completion script. You may have to log out and
181181
log back in to your shell session for the changes to take effect.
182182
183-
BASH (macOS/Homebrew):
183+
Bash (macOS/Homebrew):
184184
185185
Homebrew stores bash completion files within the Homebrew directory.
186186
With the `bash-completion` brew formula installed, run the command:
187187
188188
$ mkdir -p $(brew --prefix)/etc/bash_completion.d
189189
$ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion
190190
191-
FISH:
191+
Fish:
192192
193193
Fish completion files are commonly stored in
194194
`$HOME/.config/fish/completions`. Run the command:
@@ -199,7 +199,7 @@ pub(crate) static COMPLETIONS_HELP: &str = r"DISCUSSION:
199199
This installs the completion script. You may have to log out and
200200
log back in to your shell session for the changes to take effect.
201201
202-
ZSH:
202+
Zsh:
203203
204204
ZSH completions are commonly stored in any directory listed in
205205
your `$fpath` variable. To use these completions, you must either
@@ -229,15 +229,15 @@ pub(crate) static COMPLETIONS_HELP: &str = r"DISCUSSION:
229229
230230
for the new completions to take effect.
231231
232-
CUSTOM LOCATIONS:
232+
Custom locations:
233233
234234
Alternatively, you could save these files to the place of your
235235
choosing, such as a custom directory inside your $HOME. Doing so
236236
will require you to add the proper directives, such as `source`ing
237237
inside your login script. Consult your shells documentation for
238238
how to add such directives.
239239
240-
POWERSHELL:
240+
PowerShell:
241241
242242
The powershell completion scripts require PowerShell v5.0+ (which
243243
comes with Windows 10, but can be downloaded separately for windows 7
@@ -261,18 +261,18 @@ pub(crate) static COMPLETIONS_HELP: &str = r"DISCUSSION:
261261
262262
PS C:\> rustup completions powershell >> ${env:USERPROFILE}\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
263263
264-
CARGO:
264+
Cargo:
265265
266266
Rustup can also generate a completion script for `cargo`. The script output
267267
by `rustup` will source the completion script distributed with your default
268268
toolchain. Not all shells are currently supported. Here are examples for
269269
the currently supported shells.
270270
271-
BASH:
271+
Bash:
272272
273273
$ rustup completions bash cargo >> ~/.local/share/bash-completion/completions/cargo
274274
275-
ZSH:
275+
Zsh:
276276
277277
$ rustup completions zsh cargo > ~/.zfunc/_cargo";
278278

tests/suite/cli-ui/rustup/rustup_completions_cmd_help_flag_stdout.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Arguments:
1313
Options:
1414
-h, --help Print help
1515
16-
DISCUSSION:
16+
Discussion:
1717
Enable tab completion for Bash, Fish, Zsh, or PowerShell
1818
The script is output on `stdout`, allowing one to re-direct the
1919
output to the file of their choosing. Where you place the file
@@ -24,7 +24,7 @@ DISCUSSION:
2424
Here are some common set ups for the three supported shells under
2525
Unix and similar operating systems (such as GNU/Linux).
2626
27-
BASH:
27+
Bash:
2828
2929
Completion files are commonly stored in `/etc/bash_completion.d/` for
3030
system-wide commands, but can be stored in
@@ -37,15 +37,15 @@ DISCUSSION:
3737
This installs the completion script. You may have to log out and
3838
log back in to your shell session for the changes to take effect.
3939
40-
BASH (macOS/Homebrew):
40+
Bash (macOS/Homebrew):
4141
4242
Homebrew stores bash completion files within the Homebrew directory.
4343
With the `bash-completion` brew formula installed, run the command:
4444
4545
$ mkdir -p $(brew --prefix)/etc/bash_completion.d
4646
$ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion
4747
48-
FISH:
48+
Fish:
4949
5050
Fish completion files are commonly stored in
5151
`$HOME/.config/fish/completions`. Run the command:
@@ -56,7 +56,7 @@ DISCUSSION:
5656
This installs the completion script. You may have to log out and
5757
log back in to your shell session for the changes to take effect.
5858
59-
ZSH:
59+
Zsh:
6060
6161
ZSH completions are commonly stored in any directory listed in
6262
your `$fpath` variable. To use these completions, you must either
@@ -86,15 +86,15 @@ DISCUSSION:
8686
8787
for the new completions to take effect.
8888
89-
CUSTOM LOCATIONS:
89+
Custom locations:
9090
9191
Alternatively, you could save these files to the place of your
9292
choosing, such as a custom directory inside your $HOME. Doing so
9393
will require you to add the proper directives, such as `source`ing
9494
inside your login script. Consult your shells documentation for
9595
how to add such directives.
9696
97-
POWERSHELL:
97+
PowerShell:
9898
9999
The powershell completion scripts require PowerShell v5.0+ (which
100100
comes with Windows 10, but can be downloaded separately for windows 7
@@ -119,18 +119,18 @@ DISCUSSION:
119119
PS C:/> rustup completions powershell >>
120120
${env:USERPROFILE}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
121121
122-
CARGO:
122+
Cargo:
123123
124124
Rustup can also generate a completion script for `cargo`. The script output
125125
by `rustup` will source the completion script distributed with your default
126126
toolchain. Not all shells are currently supported. Here are examples for
127127
the currently supported shells.
128128
129-
BASH:
129+
Bash:
130130
131131
$ rustup completions bash cargo >> ~/.local/share/bash-completion/completions/cargo
132132
133-
ZSH:
133+
Zsh:
134134
135135
$ rustup completions zsh cargo > ~/.zfunc/_cargo
136136
"""

tests/suite/cli-ui/rustup/rustup_default_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Arguments:
1313
Options:
1414
-h, --help Print help
1515
16-
DISCUSSION:
16+
Discussion:
1717
Sets the default toolchain to the one specified. If the toolchain
1818
is not already installed then it is installed first.
1919
"""

tests/suite/cli-ui/rustup/rustup_doc_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Options:
3434
--embedded-book The Embedded Rust Book
3535
-h, --help Print help
3636
37-
DISCUSSION:
37+
Discussion:
3838
Opens the documentation for the currently active toolchain with
3939
the default browser.
4040

tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Options:
3535
-h, --help Print help
3636
-V, --version Print version
3737
38-
DISCUSSION:
38+
Discussion:
3939
Rustup installs The Rust Programming Language from the official
4040
release channels, enabling you to easily switch between stable,
4141
beta, and nightly compilers and keep them updated. It makes

tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Options:
3535
-h, --help Print help
3636
-V, --version Print version
3737
38-
DISCUSSION:
38+
Discussion:
3939
Rustup installs The Rust Programming Language from the official
4040
release channels, enabling you to easily switch between stable,
4141
beta, and nightly compilers and keep them updated. It makes

tests/suite/cli-ui/rustup/rustup_override_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Commands:
1515
Options:
1616
-h, --help Print help
1717
18-
DISCUSSION:
18+
Discussion:
1919
Overrides configure Rustup to use a specific toolchain when
2020
running in a specific directory.
2121

tests/suite/cli-ui/rustup/rustup_override_cmd_remove_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Options:
1111
--nonexistent Remove override toolchain for all nonexistent directories
1212
-h, --help Print help
1313
14-
DISCUSSION:
14+
Discussion:
1515
If `--path` argument is present, removes the override toolchain
1616
for the specified directory. If `--nonexistent` argument is
1717
present, removes the override toolchain for all nonexistent

tests/suite/cli-ui/rustup/rustup_override_cmd_unset_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Options:
1111
--nonexistent Remove override toolchain for all nonexistent directories
1212
-h, --help Print help
1313
14-
DISCUSSION:
14+
Discussion:
1515
If `--path` argument is present, removes the override toolchain
1616
for the specified directory. If `--nonexistent` argument is
1717
present, removes the override toolchain for all nonexistent

tests/suite/cli-ui/rustup/rustup_run_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Options:
1616
--install Install the requested toolchain if needed
1717
-h, --help Print help
1818
19-
DISCUSSION:
19+
Discussion:
2020
Configures an environment to use the given toolchain and then runs
2121
the specified program. The command may be any program, not just
2222
rustc or cargo. This can be used for testing arbitrary toolchains

tests/suite/cli-ui/rustup/rustup_show_cmd_active-toolchain_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Options:
1010
-v, --verbose Enable verbose output with rustc information
1111
-h, --help Print help
1212
13-
DISCUSSION:
13+
Discussion:
1414
Shows the name of the active toolchain.
1515
1616
This is useful for figuring out the active tool chain from

tests/suite/cli-ui/rustup/rustup_show_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Options:
1616
-v, --verbose Enable verbose output with rustc information for all installed toolchains
1717
-h, --help Print help
1818
19-
DISCUSSION:
19+
Discussion:
2020
Shows the name of the active toolchain and the version of `rustc`.
2121
2222
If the active toolchain has installed support for additional

tests/suite/cli-ui/rustup/rustup_toolchain_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Commands:
1616
Options:
1717
-h, --help Print help
1818
19-
DISCUSSION:
19+
Discussion:
2020
Many `rustup` commands deal with *toolchains*, a single
2121
installation of the Rust compiler. `rustup` supports multiple
2222
types of toolchains. The most basic track the official release

tests/suite/cli-ui/rustup/rustup_toolchain_cmd_link_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Arguments:
1313
Options:
1414
-h, --help Print help
1515
16-
DISCUSSION:
16+
Discussion:
1717
'toolchain' is the custom name to be assigned to the new toolchain.
1818
Any name is permitted as long as:
1919
- it does not include '/' or '/' except as the last character

tests/suite/cli-ui/rustup/rustup_up_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Options:
1717
https://github.com/rust-lang/rustup/wiki/Non-host-toolchains
1818
-h, --help Print help
1919
20-
DISCUSSION:
20+
Discussion:
2121
With no toolchain specified, the `update` command updates each of
2222
the installed toolchains from the official release channels, then
2323
updates rustup itself.

tests/suite/cli-ui/rustup/rustup_update_cmd_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Options:
1717
https://github.com/rust-lang/rustup/wiki/Non-host-toolchains
1818
-h, --help Print help
1919
20-
DISCUSSION:
20+
Discussion:
2121
With no toolchain specified, the `update` command updates each of
2222
the installed toolchains from the official release channels, then
2323
updates rustup itself.

0 commit comments

Comments
 (0)