mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 06:12:40 +00:00
fix(complete): Only return imidiate child subcommands
This commit is contained in:
parent
12e1877627
commit
edabdf72b5
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ fn complete_subcommand(value: &str, cmd: &clap::Command) -> Vec<OsString> {
|
|||
value
|
||||
);
|
||||
|
||||
let mut scs = crate::generator::utils::all_subcommands(cmd)
|
||||
let mut scs = crate::generator::utils::subcommands(cmd)
|
||||
.into_iter()
|
||||
.filter(|x| x.0.starts_with(value))
|
||||
.map(|x| OsString::from(&x.0))
|
||||
|
|
Loading…
Reference in a new issue