Skip to content

Commit

Permalink
Merge pull request clap-rs#5018 from epage/dynamiite
Browse files Browse the repository at this point in the history
feat(complete)!: Allow alternative shells for dynamic completions
  • Loading branch information
epage authored Jul 19, 2023
2 parents 95d411d + 00e9217 commit 0951f93
Show file tree
Hide file tree
Showing 7 changed files with 574 additions and 551 deletions.
4 changes: 2 additions & 2 deletions clap_complete/examples/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ fn command() -> clap::Command {
.value_parser(["json", "yaml", "toml"]),
)
.args_conflicts_with_subcommands(true);
clap_complete::dynamic::bash::CompleteCommand::augment_subcommands(cmd)
clap_complete::dynamic::shells::CompleteCommand::augment_subcommands(cmd)
}

fn main() {
let cmd = command();
let matches = cmd.get_matches();
if let Ok(completions) =
clap_complete::dynamic::bash::CompleteCommand::from_arg_matches(&matches)
clap_complete::dynamic::shells::CompleteCommand::from_arg_matches(&matches)
{
completions.complete(&mut command());
} else {
Expand Down
Loading

0 comments on commit 0951f93

Please sign in to comment.