Skip to main content
Generates shell completion scripts that enable tab completion for zerobrew commands, subcommands, and options.

Usage

zb completion <SHELL>

Arguments

SHELL
string
required
The shell for which to generate completions. Supported shells:
  • bash - Bourne Again Shell
  • zsh - Z Shell
  • fish - Friendly Interactive Shell
  • powershell - PowerShell
  • elvish - Elvish Shell

Examples

Generate bash completions

zb completion bash > ~/.local/share/bash-completion/completions/zb

Generate zsh completions

zb completion zsh > "${fpath[1]}/_zb"

Generate fish completions

zb completion fish > ~/.config/fish/completions/zb.fish

Generate PowerShell completions

zb completion powershell > zb.ps1

Installation

For detailed setup instructions for each shell, including how to install and activate completions, see the Shell Completion Guide.

What Gets Completed

The completion scripts provide intelligent tab completion for:
  • Commands: install, uninstall, bundle, list, info, etc.
  • Subcommands: bundle install, bundle dump
  • Flags: --no-link, --build-from-source, --force, etc.
  • Formula names: Based on available Homebrew formulas
  • File paths: For commands that accept file arguments

Build docs developers (and LLMs) love