rustup-{set,self,completions,doc,override,component}: add page (#10729)

* rustup set: add page

* rustup self: add page

* rustup completions: add page

* rustup doc: add page

* rustup override: add page

* rustup component: add page

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
pull/23/head
Lena 2023-09-19 14:53:11 +02:00 committed by GitHub
parent 02b70933d3
commit 3f480249d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# rustup completions
> Generate shell completions for `rustup` and `cargo`.
> More information: <https://rust-lang.github.io/rustup>.
- Print the completion script to `stdout`:
`rustup completions {{bash|elvish|fish|powershell|zsh}} {{rustup|cargo}}`

View File

@ -0,0 +1,21 @@
# rustup component
> Modify a toolchain's installed components.
> Without the `--toolchain` option `rustup` will use the default toolchain. See `rustup help toolchain` for more information about toolchains.
> More information: <https://rust-lang.github.io/rustup>.
- Add a component to a toolchain:
`rustup component add --toolchain {{toolchain}} {{component}}`
- Remove a component from a toolchain:
`rustup component remove --toolchain {{toolchain}} {{component}}`
- List installed and available components for a toolchain:
`rustup component list --toolchain {{toolchain}}`
- List installed components for a toolchain:
`rustup component list --toolchain {{toolchain}} --installed`

View File

@ -0,0 +1,25 @@
# rustup doc
> Open the offline Rust documentation for the current toolchain.
> There are a lot more documentation pages not mentioned here. See `rustup help doc` for more information.
> More information: <https://rust-lang.github.io/rustup>.
- Open the main page:
`rustup doc`
- Open the documentation for a specific topic (a module in the standard library, a type, a keyword, etc.):
`rustup doc {{std::fs|usize|fn|...}}`
- Open the Rust Programming Language book:
`rustup doc --book`
- Open the Cargo book:
`rustup doc --cargo`
- Open the Rust Reference:
`rustup doc --reference`

View File

@ -0,0 +1,21 @@
# rustup override
> Modify directory toolchain overrides.
> See `rustup help toolchain` for more information about toolchains.
> More information: <https://rust-lang.github.io/rustup>.
- List directiory toolchain overrides:
`rustup override list`
- Set the override toolchain for the current directory (i.e. tell `rustup` to run `cargo`, `rustc`, etc. from a specific toolchain when in that directory):
`rustup override set {{toolchain}}`
- Remove the toolchain override for the current directory:
`rustup override unset`
- Remove all toolchain overrides for directories that no longer exist:
`rustup override unset --nonexistent`

View File

@ -0,0 +1,12 @@
# rustup self
> Modify the `rustup` installation.
> More information: <https://rust-lang.github.io/rustup>.
- Update `rustup`:
`rustup self update`
- Uninstall `rustup`:
`rustup self uninstall`

View File

@ -0,0 +1,16 @@
# rustup set
> Alter `rustup` settings.
> More information: <https://rust-lang.github.io/rustup>.
- Set the default host triple:
`rustup set default-host {{host_triple}}`
- Set the default profile (`minimal` includes only `rustc`, `rust-std` and `cargo`, whereas `default` adds `rust-docs`, `rustfmt` and `clippy`):
`rustup set profile {{minimal|default}}`
- Set whether `rustup` should update itself when running `rustup update`:
`rustup set auto-self-update {{enable|disable|check-only}}`