We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
cargo help <TAB>
1 parent 0461165 commit f64411cCopy full SHA for f64411c
1 file changed
src/bin/cargo/commands/help.rs
@@ -15,7 +15,19 @@ const COMPRESSED_MAN: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/man.tgz"
15
pub fn cli() -> Command {
16
subcommand("help")
17
.about("Displays help for a cargo subcommand")
18
- .arg(Arg::new("COMMAND").action(ArgAction::Set))
+ .arg(Arg::new("COMMAND").action(ArgAction::Set).add(
19
+ clap_complete::ArgValueCandidates::new(|| {
20
+ super::builtin()
21
+ .iter()
22
+ .map(|cmd| {
23
+ let name = cmd.get_name();
24
+ clap_complete::CompletionCandidate::new(name)
25
+ .help(cmd.get_about().cloned())
26
+ .hide(cmd.is_hide_set())
27
+ })
28
+ .collect()
29
+ }),
30
+ ))
31
}
32
33
pub fn exec(gctx: &mut GlobalContext, args: &ArgMatches) -> CliResult {
0 commit comments