Skip to main content

Shell Completions

Generate tab-completion scripts for your shell.

Supported shells

  • Bash
  • Zsh
  • Fish
  • PowerShell
  • Elvish

Installation

Bash

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

Or system-wide:

hooklistener completions bash | sudo tee /etc/bash_completion.d/hooklistener > /dev/null

Zsh

hooklistener completions zsh > ~/.zfunc/_hooklistener

Make sure ~/.zfunc is in your fpath. Add to ~/.zshrc if needed:

fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit

Fish

hooklistener completions fish > ~/.config/fish/completions/hooklistener.fish

PowerShell

hooklistener completions powershell >> $PROFILE

Elvish

hooklistener completions elvish > ~/.elvish/lib/hooklistener.elv

Usage

After installation, restart your shell or source the completion file. Then use Tab to autocomplete commands, subcommands, and flags:

hooklistener end<Tab>      # completes to "endpoint"
hooklistener endpoint <Tab> # shows: create, list, show, delete, ...