Skip to content

Improvements and clean-up for docs and help messages #3542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 2 additions & 3 deletions doc/user-guide/src/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,8 @@ host-specific toolchains.

#### path

The `path` setting allows a custom toolchain to be used. The value is a
path string. A relative path is resolved relative to the location of the
`rust-toolchain.toml` file.
The `path` setting allows a custom toolchain to be used. The value is an
absolute path string.

Since a `path` directive directly names a local toolchain, other options
like `components`, `targets`, and `profile` have no effect.
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