Shell Completions
vibepg can generate completion scripts for bash, zsh, fish, PowerShell, and elvish. Tab completion covers commands, subcommands, and instance-name-shaped arguments.
Install
bash
vibepg completions bash > /usr/local/etc/bash_completion.d/vibepg
# or, for system-wide on Linux:
vibepg completions bash | sudo tee /etc/bash_completion.d/vibepg > /dev/nullbash
# pick any directory on your $fpath, or use the first one:
vibepg completions zsh > "${fpath[1]}/_vibepg"
# then in a fresh shell:
autoload -Uz compinit && compinitbash
vibepg completions fish > ~/.config/fish/completions/vibepg.fishpowershell
# Append to your PowerShell profile so it loads on every session:
vibepg completions powershell >> $PROFILEbash
vibepg completions elvish > ~/.config/elvish/lib/vibepg-completions.elv
# then in your rc.elv:
# use vibepg-completionsVerifying it works
Open a new shell, type vibepg (with a trailing space), and hit <Tab>. You should see all top-level subcommands. Tab-complete a flag — vibepg new --<Tab> — and you should see --ephemeral, --port, etc.
Troubleshooting
- Nothing happens on
<Tab>— make sure you opened a new shell after installing the completion. Old shells don't pick it up. zsh: command not found: compinit— your zsh config doesn't initialize the completion system. Addautoload -Uz compinit && compinitto your.zshrc.- Completion file not in
$fpath—echo $fpathto inspect; place the file in any directory listed there, or extend$fpathin.zshrcbeforecompinitruns. - Stale completions after upgrade — re-run
vibepg completions <shell>and overwrite. The script is regenerated from the live CLI definitions, so it always matches your installed version. - PowerShell complains about script execution — set the execution policy:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned.