From afdf053694bd844224732bf66a7e322b6da34189 Mon Sep 17 00:00:00 2001 From: Xiangfei Ding Date: Fri, 19 Dec 2025 14:20:48 +0000 Subject: [PATCH] Add common commands section in help text Judging from user feedback coming out of Debian distros, it appears that after installing `rustup` from the package manager it is not immediately clear which command installs the toolchain. This patch adds a small text so that after installation of `rustup`, which normally does not invoke the toolchain installation for the user, the user can still receive guidance on how to set up the local toolchain immediately. Signed-off-by: Xiangfei Ding --- src/cli/help.rs | 13 +++++++++- .../rustup_help_cmd.stdout.term.svg | 22 ++++++++++++++++- .../rustup_help_flag.stdout.term.svg | 22 ++++++++++++++++- .../rustup_only_options.stderr.term.svg | 24 +++++++++++++++++-- 4 files changed, 76 insertions(+), 5 deletions(-) diff --git a/src/cli/help.rs b/src/cli/help.rs index dd0d05bc16..a59b100367 100644 --- a/src/cli/help.rs +++ b/src/cli/help.rs @@ -11,7 +11,18 @@ pub(crate) fn rustup_help() -> String { for common platforms. If you are new to Rust consider running `rustup doc --book` to - learn Rust." + learn Rust. + +{HEADER}Common commands:{HEADER:#} + + Update Rust toolchains and rustup + + {LITERAL}$ rustup update{LITERAL:#} + + Install the current stable release of Rust for your host platform + + {LITERAL}$ rustup toolchain install stable{LITERAL:#} + " ) } diff --git a/tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg index 83f1887a95..1ac00ed0a2 100644 --- a/tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg +++ b/tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg @@ -1,4 +1,4 @@ - +