From 08e5b04590a7bab04c0ab7a39b03bb5efbd482d7 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 29 Aug 2023 15:31:17 -0500 Subject: [PATCH] fix(help): Provide better commands heading for styling In working on #12578, I felt it would be weird to style the entire statement about commands but it also felt weird to not style it. So this change explores and alternatively way of communicating the information. --- src/bin/cargo/cli.rs | 3 ++- tests/testsuite/cargo/help/stdout.log | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/cargo/cli.rs b/src/bin/cargo/cli.rs index eb337d681ce0..5d8ddc8522d3 100644 --- a/src/bin/cargo/cli.rs +++ b/src/bin/cargo/cli.rs @@ -542,7 +542,7 @@ Usage: {usage} Options: {options} -Some common cargo commands are (see all commands with --list): +Commands: build, b Compile the current package check, c Analyze the current package and report errors, but don't build object files clean Remove the target directory @@ -559,6 +559,7 @@ Some common cargo commands are (see all commands with --list): publish Package and upload this package to the registry install Install a Rust binary. Default location is $HOME/.cargo/bin uninstall Uninstall a Rust binary + ... See all commands with --list See 'cargo help ' for more information on a specific command.\n", ) diff --git a/tests/testsuite/cargo/help/stdout.log b/tests/testsuite/cargo/help/stdout.log index 26bcd745bd60..ae9812e274f6 100644 --- a/tests/testsuite/cargo/help/stdout.log +++ b/tests/testsuite/cargo/help/stdout.log @@ -18,7 +18,7 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details -h, --help Print help -Some common cargo commands are (see all commands with --list): +Commands: build, b Compile the current package check, c Analyze the current package and report errors, but don't build object files clean Remove the target directory @@ -35,5 +35,6 @@ Some common cargo commands are (see all commands with --list): publish Package and upload this package to the registry install Install a Rust binary. Default location is $HOME/.cargo/bin uninstall Uninstall a Rust binary + ... See all commands with --list See 'cargo help ' for more information on a specific command.