From 3f480249d9d4f2395f88e387e45e31af53550146 Mon Sep 17 00:00:00 2001 From: Lena <126529524+acuteenvy@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:53:11 +0200 Subject: [PATCH] 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 --- pages/common/rustup-completions.md | 8 ++++++++ pages/common/rustup-component.md | 21 +++++++++++++++++++++ pages/common/rustup-doc.md | 25 +++++++++++++++++++++++++ pages/common/rustup-override.md | 21 +++++++++++++++++++++ pages/common/rustup-self.md | 12 ++++++++++++ pages/common/rustup-set.md | 16 ++++++++++++++++ 6 files changed, 103 insertions(+) create mode 100644 pages/common/rustup-completions.md create mode 100644 pages/common/rustup-component.md create mode 100644 pages/common/rustup-doc.md create mode 100644 pages/common/rustup-override.md create mode 100644 pages/common/rustup-self.md create mode 100644 pages/common/rustup-set.md diff --git a/pages/common/rustup-completions.md b/pages/common/rustup-completions.md new file mode 100644 index 000000000..f0438f5be --- /dev/null +++ b/pages/common/rustup-completions.md @@ -0,0 +1,8 @@ +# rustup completions + +> Generate shell completions for `rustup` and `cargo`. +> More information: . + +- Print the completion script to `stdout`: + +`rustup completions {{bash|elvish|fish|powershell|zsh}} {{rustup|cargo}}` diff --git a/pages/common/rustup-component.md b/pages/common/rustup-component.md new file mode 100644 index 000000000..765cddf5d --- /dev/null +++ b/pages/common/rustup-component.md @@ -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: . + +- 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` diff --git a/pages/common/rustup-doc.md b/pages/common/rustup-doc.md new file mode 100644 index 000000000..10b27a762 --- /dev/null +++ b/pages/common/rustup-doc.md @@ -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: . + +- 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` diff --git a/pages/common/rustup-override.md b/pages/common/rustup-override.md new file mode 100644 index 000000000..5e9a85e7f --- /dev/null +++ b/pages/common/rustup-override.md @@ -0,0 +1,21 @@ +# rustup override + +> Modify directory toolchain overrides. +> See `rustup help toolchain` for more information about toolchains. +> More information: . + +- 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` diff --git a/pages/common/rustup-self.md b/pages/common/rustup-self.md new file mode 100644 index 000000000..ffc8cc131 --- /dev/null +++ b/pages/common/rustup-self.md @@ -0,0 +1,12 @@ +# rustup self + +> Modify the `rustup` installation. +> More information: . + +- Update `rustup`: + +`rustup self update` + +- Uninstall `rustup`: + +`rustup self uninstall` diff --git a/pages/common/rustup-set.md b/pages/common/rustup-set.md new file mode 100644 index 000000000..7c504cf6d --- /dev/null +++ b/pages/common/rustup-set.md @@ -0,0 +1,16 @@ +# rustup set + +> Alter `rustup` settings. +> More information: . + +- 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}}`