Skip to content

Commit

Permalink
Clarify several docs and help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
majaha authored and rami3l committed Nov 25, 2023
1 parent e9de885 commit ab0f5bb
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 14 deletions.
13 changes: 10 additions & 3 deletions doc/user-guide/src/concepts/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,22 @@ available at this time are `minimal`, `default`, and `complete`:
install the needed additional components manually, either by using `rustup
component add` or by using `-c` when installing the toolchain.

To change the `rustup` profile you can use the `rustup set profile` command.
To change the profile `rustup install` uses by default, you can use the
`rustup set profile` command.
For example, to select the minimal profile you can use:

```console
rustup set profile minimal
```

It's also possible to choose the profile when installing `rustup` for the
first time, either interactively by choosing the "Customize installation"
You can also directly select the profile used when installing a toolchain with:

```console
rustup install --profile <name>
```

It's also possible to choose the default profile when installing `rustup` for
the first time, either interactively by choosing the "Customize installation"
option or programmatically by passing the `--profile=<name>` flag. Profiles
will only affect newly installed toolchains: as usual it will be possible to
install individual components later with: `rustup component add`.
Expand Down
6 changes: 3 additions & 3 deletions src/cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ pub(crate) fn cli() -> Command {
Command::new("home")
.about("Display the computed value of RUSTUP_HOME"),
)
.subcommand(Command::new("profile").about("Show the current profile"))
.subcommand(Command::new("profile").about("Show the default profile used for the `rustup install` command"))
)
.subcommand(
Command::new("install")
Expand Down Expand Up @@ -625,7 +625,7 @@ pub(crate) fn cli() -> Command {
)
.subcommand(
Command::new("override")
.about("Modify directory toolchain overrides")
.about("Modify toolchain overrides for directories")
.after_help(OVERRIDE_HELP)
.subcommand_required(true)
.arg_required_else_help(true)
Expand Down Expand Up @@ -784,7 +784,7 @@ pub(crate) fn cli() -> Command {
)
.subcommand(
Command::new("profile")
.about("The default components installed")
.about("The default components installed with a toolchain")
.arg(
Arg::new("profile-name")
.required(true)
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Commands:
toolchain Modify or query the installed toolchains
target Modify a toolchain's supported targets
component Modify a toolchain's installed components
override Modify directory toolchain overrides
override Modify toolchain overrides for directories
run Run a command with an environment configured for a given toolchain
which Display which binary will be run for a given command
doc Open the documentation for the current toolchain
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Commands:
toolchain Modify or query the installed toolchains
target Modify a toolchain's supported targets
component Modify a toolchain's installed components
override Modify directory toolchain overrides
override Modify toolchain overrides for directories
run Run a command with an environment configured for a given toolchain
which Display which binary will be run for a given command
doc Open the documentation for the current toolchain
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/cli-ui/rustup/rustup_only_options_stdout.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Commands:
toolchain Modify or query the installed toolchains
target Modify a toolchain's supported targets
component Modify a toolchain's installed components
override Modify directory toolchain overrides
override Modify toolchain overrides for directories
run Run a command with an environment configured for a given toolchain
which Display which binary will be run for a given command
doc Open the documentation for the current toolchain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bin.name = "rustup"
args = ["override","--help"]
stdout = """
...
Modify directory toolchain overrides
Modify toolchain overrides for directories
Usage: rustup[EXE] override <COMMAND>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Usage: rustup[EXE] set <COMMAND>
Commands:
default-host The triple used to identify toolchains when not specified
profile The default components installed
profile The default components installed with a toolchain
auto-self-update The rustup auto self update mode
help Print this message or the help of the given subcommand(s)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bin.name = "rustup"
args = ["set","profile","--help"]
stdout = """
...
The default components installed
The default components installed with a toolchain
Usage: rustup[EXE] set profile <profile-name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Usage: rustup[EXE] show [OPTIONS] [COMMAND]
Commands:
active-toolchain Show the active toolchain
home Display the computed value of RUSTUP_HOME
profile Show the current profile
profile Show the default profile used for the `rustup install` command
help Print this message or the help of the given subcommand(s)
Options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bin.name = "rustup"
args = ["show","profile","--help"]
stdout = """
...
Show the current profile
Show the default profile used for the `rustup install` command
Usage: rustup[EXE] show profile
Expand Down

0 comments on commit ab0f5bb

Please sign in to comment.