Home

Awesome

batect-zsh-completion

Pipeline

Shell tab completions for Zsh.

Requirements

Installing

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.

How this works

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.

Useful references

The manual for Zsh's completion system is quite detailed and isn't a great tutorial. These articles were useful when building this:

For the testing script, these served as inspiration: