Skip to content

completions

Emit shell-completion scripts so snippbot <TAB> auto-completes commands, subcommands, and options.

Terminal window
snippbot completions <shell> # Print the script to stdout
snippbot completions <shell> --install-help # Print install instructions

Supported shells: bash, zsh, fish.


Activate in your current shell (useful for testing):

Terminal window
eval "$(snippbot completions bash)"

Persist across sessions — add to ~/.bashrc:

Terminal window
eval "$(snippbot completions bash)"

Or save to a completions directory:

Terminal window
snippbot completions bash > ~/.local/share/bash-completion/completions/snippbot

Activate in your current shell:

Terminal window
eval "$(snippbot completions zsh)"

Persist — add to ~/.zshrc before compinit:

Terminal window
eval "$(snippbot completions zsh)"

Or save to a fpath directory:

Terminal window
snippbot completions zsh > ~/.zfunc/_snippbot
# Make sure ~/.zfunc is on your fpath:
fpath=(~/.zfunc $fpath)
autoload -U compinit && compinit

Save to fish’s completions directory (loaded automatically):

Terminal window
snippbot completions fish > ~/.config/fish/completions/snippbot.fish

Once activated, the following are tab-completable:

  • Every top-level command: snippbot <TAB> → start, stop, status, config, project, …
  • Every subcommand: snippbot config <TAB> → get, set, delete, list, path, init
  • Every option: snippbot start --<TAB> → —dev, —port, —host
  • Choice values: snippbot setup --mode <TAB> → self-hosted, cloud

  • Overview — full list of commands that become completable