completions: fix zsh autocompletion issues#10845
Merged
nandahkrishna merged 5 commits intoHomebrew:masterfrom Mar 17, 2021
nandahkrishna:fix-completions-zsh
Merged
completions: fix zsh autocompletion issues#10845nandahkrishna merged 5 commits intoHomebrew:masterfrom nandahkrishna:fix-completions-zsh
nandahkrishna merged 5 commits intoHomebrew:masterfrom
nandahkrishna:fix-completions-zsh
Conversation
Contributor
|
Review period will end on 2021-03-16 at 00:00:00 UTC. |
Contributor
|
Review period ended. |
BrewTestBot
approved these changes
Mar 16, 2021
auto-merge was automatically disabled
March 16, 2021 00:14
Base branch was modified
Rylan12
reviewed
Mar 16, 2021
Member
Rylan12
left a comment
There was a problem hiding this comment.
This is really cool. It doesn't work with commands like brew uninstall yet, though (I think because of the difference between formula and installed_formula). Would it be difficult to get that working in this PR?
Member
Author
|
I have an approach in mind, although it may not be ideal. I'll try to get it done in this PR. |
Rylan12
approved these changes
Mar 17, 2021
Member
Rylan12
left a comment
There was a problem hiding this comment.
Fantastic! Works great! Thanks for working on this, @nandahkrishna!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?This PR aims to improve the ZSH completions.
Earlier, conflicts weren't handled:
Now:
Also, this fixes the problem of only one formula/cask/named argument being suggested despite a command being able to take multiple named arguments. However, it isn't smart enough yet (to handle minimum/maximum number of arguments).
Note: So far, I've only handled "direct" conflicts related to named arguments. Some other (known) issues do exist, even with respect to handling conflicts. For example,
(This shouldn't suggest casks.)