Shell tab completions for Zsh.
With Homebrew
brew install batect/batect/batect-zsh-completion
You'll need to restart Zsh for the change to take effect.
With Oh My Zsh
Clone this repository into your plugins directory:
cd "$ZSH_CUSTOM/plugins/"
git clone https://github.com/batect/batect-zsh-completion.git batect
Then edit ~/.zshrc
, adding batect
to your existing list of plugins:
plugins=(...your existing plugins... batect)
You'll need to restart Zsh for the change to take effect.
In order to enable multiple projects to co-exist with different versions of Batect (and corresponding different available options), the completion script in this repository acts as a proxy to the completion script generated by the appropriate version of Batect.
The original RFC for shell tab completion has further explanation.
The manual for Zsh's completion system is quite detailed and isn't a great tutorial. These articles were useful when building this:
- https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org
- https://wikimatze.de/writing-zsh-completion-for-padrino/
- https://web.archive.org/web/20190411104837/http://www.linux-mag.com/id/1106/
- http://zv.github.io/a-review-of-zsh-completion-utilities
For the testing script, these served as inspiration: