Skip to content

Commit

Permalink
Include help in --list
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 16, 2022
1 parent e778b3d commit b655a89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bin/cargo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ fn list_commands(config: &Config) -> BTreeMap<String, CommandInfo> {
}
}

// `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
}

Expand Down

0 comments on commit b655a89

Please sign in to comment.