zinit
zinit copied to clipboard
feat: check for completion files
Description
Related Issue(s)
Motivation and Context
Usage examples
before
zinit for cp"hub-*/etc/hub.zsh_completion -> _hub" from'gh-r' sbin'hub' @mislav/hub
after
zinit for from'gh-r' sbin'hub' @mislav/hub
How Has This Been Tested?
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Documentation change
- [ ] New feature (non-breaking change which adds functionality)
Checklist:
- [ ] All new and existing tests passed.
- [ ] I have added tests to cover my changes.
- [ ] I have updated the documentation accordingly.
Automatically detect completion files
@jankatins, thoughts?
To be honest, I'm fine with the "less magic" variant of renaming to _something instead of automagically figuring out a file which contains completions ("explicit is better than implicit" -> python zen :-)). I tried to figure out which line actually contains the trigger and I think I found it (**/(_*|*.zsh*) or so) and that looks fine...
What happens if two files end up getting symlinked under the same name?