Enabling wbsp-app shell autocomplete (macOS + zsh)
wbsp-app generates its own completion script (it's a Cobra CLI). It also supports
bash, fish, and powershell via wbsp-app completion <shell>, but these instructions
target macOS + zsh.
Try it for the current shell first (instant, no setup)
source <(wbsp-app completion zsh)Type wbsp-app <Tab> — if you get subcommand completions, it works. Now make it
permanent.
Make it permanent
1. Ensure zsh completion is initialized
(once — skip if your ~/.zshrc already has compinit)
echo "autoload -U compinit; compinit" >> ~/.zshrc2. Write the completion file to a directory on zsh's fpath
If you have Homebrew (most macOS dev setups):
wbsp-app completion zsh > $(brew --prefix)/share/zsh/site-functions/_wbsp-appIf you don't have Homebrew (e.g. you installed via curl … | bash, so brew
isn't required):
mkdir -p ~/.zsh/completions
wbsp-app completion zsh > ~/.zsh/completions/_wbsp-app…and add this to ~/.zshrc above the compinit line:
fpath=(~/.zsh/completions $fpath)3. Restart the shell
exec zshNotes / gotchas
-
wbsp-appmust be on yourPATH(the installer put it in/usr/local/binor~/.local/bin). Check:which wbsp-app. -
If completions don't appear after restart, the completion cache is stale — rebuild it:
rm -f ~/.zcompdump*; compinit -
Other shells are supported too (
wbsp-app completion bash|fish|powershell) if you use them elsewhere.