Completion Commands
Enable tab completion for bash, zsh, or fish shells.
Global options available on completion commands: --json, --no-color.
Supported Shells
Section titled “Supported Shells”| Shell | Config File |
|---|---|
| bash | ~/.bashrc |
| zsh | ~/.zshrc |
| fish | ~/.config/fish/config.fish |
bb completion install
Section titled “bb completion install”Install shell completions for your current shell.
bb completion install [options]Options
Section titled “Options”| Option | Description |
|---|---|
--json | Output as JSON |
The installer auto-detects your shell and adds the necessary configuration.
Post-Installation
Section titled “Post-Installation”After installing, restart your shell or source your config:
# Bashsource ~/.bashrc
# Zshsource ~/.zshrc
# Fishsource ~/.config/fish/config.fishExamples
Section titled “Examples”# Install completionsbb completion install
# Install with JSON outputbb completion install --json
# Test it worksbb <Tab> # Shows: auth, repo, pr, config, completionbb repo <Tab> # Shows: clone, create, list, view, deletebb completion uninstall
Section titled “bb completion uninstall”Remove shell completions.
bb completion uninstall [options]Options
Section titled “Options”| Option | Description |
|---|---|
--json | Output as JSON |
Examples
Section titled “Examples”# Remove completionsbb completion uninstall
# Remove completions with JSON outputbb completion uninstall --jsonWhat Gets Completed
Section titled “What Gets Completed”Tab completion works for:
- Commands:
auth,repo,pr,config,completion - Subcommands:
login,clone,create,list, etc. - Options:
--json,--no-color,--workspace,--repo,--help
-w is reserved as the global shorthand for --workspace.
Example Session
Section titled “Example Session”$ bb pr<Tab>pr
$ bb pr <Tab>activity approve checks checkout comments create declinediff edit list merge ready reviewers view
$ bb pr create --<Tab>--body --close-source-branch --destination--draft --help --repo--source --title --workspace