Skip to content

Completion command

Muhammet Şafak edited this page Oct 10, 2026 · 1 revision

Home / Commands / completion

commitbrief completion

Generates a shell autocompletion script for commitbrief — subcommands, flags, and flag values complete on Tab. It is cobra's built-in completion command, so it behaves like the same command in other cobra-based tools. It makes no provider call and costs nothing.

Synopsis

commitbrief completion bash [--no-descriptions]
commitbrief completion zsh [--no-descriptions]
commitbrief completion fish [--no-descriptions]
commitbrief completion powershell [--no-descriptions]

The script is written to stdout; redirect it to the location your shell reads completions from.

Flags

Flag Description
--no-descriptions Disable the per-candidate descriptions in the completion list.

The global flags are inherited but have no effect on this command.

Install

Run the command for your shell once, then start a new shell.

bash

Needs the bash-completion package.

# current session
source <(commitbrief completion bash)

# every new session — Linux
commitbrief completion bash > /etc/bash_completion.d/commitbrief

# every new session — macOS (Homebrew)
commitbrief completion bash > $(brew --prefix)/etc/bash_completion.d/commitbrief

zsh

If completion is not enabled yet, run once: echo "autoload -U compinit; compinit" >> ~/.zshrc.

# current session
source <(commitbrief completion zsh)

# every new session — Linux
commitbrief completion zsh > "${fpath[1]}/_commitbrief"

# every new session — macOS (Homebrew)
commitbrief completion zsh > $(brew --prefix)/share/zsh/site-functions/_commitbrief

fish

# current session
commitbrief completion fish | source

# every new session
commitbrief completion fish > ~/.config/fish/completions/commitbrief.fish

PowerShell

# current session
commitbrief completion powershell | Out-String | Invoke-Expression

To load it in every new session, add the output of that command to your PowerShell profile.

Notes

  • The script is generated for the binary you run. After upgrading, regenerate it so new subcommands and flags complete.
  • It only prints a script; it sends no diff to any provider.

See also

  • Installation — getting the binary onto your PATH.
  • Global flags — the flags you will see completed.
  • Upgrade — regenerate the script after an upgrade.

Clone this wiki locally