jump to content

CLI autocomplete

Generate and install prb shell completion scripts for Bash, Zsh, Fish or PowerShell, and then check the performance of command completion and flag.

Show as Markdown

The prb completion command generates a self-complete script for the shell.

Select the shell below to enable automatic completions for the current session or for each new session.

For the current session:

Terminal window
source <(prb completion bash)

To activate automatic completions for each Linux session:

Terminal window
prb completion bash | sudo tee /etc/bash_completion.d/prb >/dev/null

With Homebrew:

Terminal window
brew install bash-completion@2
prb completion bash > "$(brew --prefix)/etc/bash_completion.d/prb"

Bash must load bash-completion in order for the generated script to take effect.

Type a partial command and press Tab. For example:

Terminal window
prb fram<Tab>

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

Terminal window
prb framework l<Tab>
prb framework list --o<Tab>

If the filling doesn’t work, confirm that prb is available in the new shell and regenerate the script after CLI update so that it includes the latest commands and flags.

Ultima actualizare: