Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(complete): Fix zsh.rs subcommand deduplication
Fixing the iteration over all_subcommands in zsh.rs. We deduplicate values on (sc_name, bin_name) keys, but then only iterate on bin_name. This doesn't cause problems now, since all bin names seem to be unique. However, without fixing this, the next commit would have started generating duplicated functions with same names. For example, with an #[long = "foo", visible_alias = "bar"] subcommand, we'll end up with 2 pairs: [("foo", "foo"), ("bar", "foo")]. Before this commit, we would have ended up generating _my-app__foo_commands() functions. These functions should have identical content, so it is not an error, just an inefficiency that we can fix.
- Loading branch information