jump to content

CLI autocomplete

Generate and install prb shell completion scripts for Bash, Zsh, Fish, or PowerShell, then verify that command and flag completion works.

View as Markdown

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/null

On macOS with Homebrew:

brew install bash-completion@2
prb 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.

Type a partial command and press Tab. For example:

prb fram

Your shell should complete it to prb framework. You can also test subcommands and flags:

prb framework l
prb framework list --o

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.

Ultima actualizare: