Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

batect/batect-zsh-completion

batect-zsh-completion

Pipeline

Shell tab completions for Zsh.

Requirements

  • Batect v0.67 or later in your project
  • Zsh v5.8 or later

Installing

brew install batect/batect/batect-zsh-completion

You'll need to restart Zsh for the change to take effect.

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: