From d7e652bb02d98adac822c44e16bce701c5dc4aa8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 7 Nov 2025 15:11:30 -0600 Subject: [PATCH] fix(cli): Refer to commands, not subcommands This makes us completely consistent on referring to cargo commands for the top-level commands. Fixes #10195 --- src/bin/cargo/commands/help.rs | 2 +- src/bin/cargo/main.rs | 2 +- tests/testsuite/cargo_help/help/stdout.term.svg | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/cargo/commands/help.rs b/src/bin/cargo/commands/help.rs index f9f91cf7249..913dabb1424 100644 --- a/src/bin/cargo/commands/help.rs +++ b/src/bin/cargo/commands/help.rs @@ -14,7 +14,7 @@ const COMPRESSED_MAN: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/man.tgz" pub fn cli() -> Command { subcommand("help") - .about("Displays help for a cargo subcommand") + .about("Displays help for a cargo command") .arg(Arg::new("COMMAND").action(ArgAction::Set).add( clap_complete::ArgValueCandidates::new(|| { super::builtin() diff --git a/src/bin/cargo/main.rs b/src/bin/cargo/main.rs index 20ebb8dc5f8..97b5b9d270c 100644 --- a/src/bin/cargo/main.rs +++ b/src/bin/cargo/main.rs @@ -212,7 +212,7 @@ fn list_commands(gctx: &GlobalContext) -> BTreeMap { commands.insert( "help".to_string(), CommandInfo::BuiltIn { - about: Some("Displays help for a cargo subcommand".to_string()), + about: Some("Displays help for a cargo command".to_string()), }, ); diff --git a/tests/testsuite/cargo_help/help/stdout.term.svg b/tests/testsuite/cargo_help/help/stdout.term.svg index 63dbd628eef..d96174b1420 100644 --- a/tests/testsuite/cargo_help/help/stdout.term.svg +++ b/tests/testsuite/cargo_help/help/stdout.term.svg @@ -1,7 +1,7 @@