From b655a8965cce4ff719e7174251b1ba82ea7b3827 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 16 Jan 2022 11:14:04 -0800 Subject: [PATCH] Include `help` in `--list` --- src/bin/cargo/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bin/cargo/main.rs b/src/bin/cargo/main.rs index af2e4141c80..109cd5de5b2 100644 --- a/src/bin/cargo/main.rs +++ b/src/bin/cargo/main.rs @@ -144,6 +144,14 @@ fn list_commands(config: &Config) -> BTreeMap { } } + // `help` is special, so it needs to be inserted separately. + commands.insert( + "help".to_string(), + CommandInfo::BuiltIn { + about: Some("Displays help for a cargo subcommand".to_string()), + }, + ); + commands }