CLI autocomplete
Enable prb command and flag completion in Bash, Zsh, Fish, or PowerShell
The prb completion command generates an autocomplete script for your shell.
It completes commands, subcommands, flags, and supported values.
Choose your shell below to enable autocomplete for the current session or every new session.
For the current session:
source <(prb completion bash)To enable autocomplete for every session on Linux:
prb completion bash | sudo tee /etc/bash_completion.d/prb >/dev/nullOn macOS with Homebrew:
brew install bash-completion@2prb completion bash > "$(brew --prefix)/etc/bash_completion.d/prb"Start a new shell after installing the script. Bash must load
bash-completion for the generated script to take effect.
For the current session:
source <(prb completion zsh)To enable autocomplete for every session:
prb completion zsh > "${fpath[1]}/_prb"Start a new shell after installing the script. If completion is not already
initialized by your Zsh configuration, add this to ~/.zshrc:
autoload -Uz compinitcompinitFor the current session:
prb completion fish | sourceTo enable autocomplete for every session:
mkdir -p ~/.config/fish/completionsprb completion fish > ~/.config/fish/completions/prb.fishThe completion script is available the next time Fish starts.
For the current session:
prb completion powershell | Out-String | Invoke-ExpressionTo enable autocomplete for every session, create your PowerShell profile if needed and add the command to it:
if (!(Test-Path -Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force}'prb completion powershell | Out-String | Invoke-Expression' | Add-Content $PROFILEReload your profile to use autocomplete immediately:
. $PROFILEVerify autocomplete
Section titled “Verify autocomplete”Type a partial command and press Tab. For example:
prb fram<Tab>Your shell should complete it to prb framework. You can also test subcommands
and flags:
prb framework l<Tab>prb framework list --o<Tab>If completion does not work, confirm that prb is available in the new shell
and regenerate the script after upgrading the CLI so it includes the latest
commands and flags.