From 31e414cccb6e6fb97532b924e23887003717a2cc 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 an 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 d1ca475f440..ce6112817ec 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 0ae50d0e43c..e15848ab784 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.