Skip to content

Commit

Permalink
feat: completion support for subcommand aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
nasso committed Mar 21, 2024
1 parent 4e07b43 commit 24ac929
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clap_complete/src/generator/utils.rs
Expand Up @@ -49,6 +49,10 @@ pub fn subcommands(p: &Command) -> Vec<(String, String)> {
);

subcmds.push((sc.get_name().to_string(), sc_bin_name.to_string()));

for a in sc.get_visible_aliases() {
subcmds.push((a.to_string(), sc_bin_name.to_string()));
}
}

subcmds
Expand Down

0 comments on commit 24ac929

Please sign in to comment.