Skip to content

Shell Completions

The capsem CLI ships with tab-completion scripts for bash, zsh, fish, and PowerShell. Generate the script once and source it from your shell’s startup file.

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

Or on macOS with Homebrew bash-completion:

Terminal window
capsem completions bash > /opt/homebrew/etc/bash_completion.d/capsem

Restart your shell (or source the file) and tab-completion works for capsem <TAB>.

Terminal window
mkdir -p ~/.zfunc
capsem completions zsh > ~/.zfunc/_capsem

Ensure ~/.zfunc is on your fpath in ~/.zshrc:

Terminal window
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit

Restart your shell.

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

fish picks this up automatically on the next prompt.

Terminal window
capsem completions powershell | Out-String | Invoke-Expression

To load on every session, add the line to $PROFILE.

Type capsem followed by TAB. You should see subcommands (create, shell, list, info, …). Completion is generated from the live CLI definition, so it always matches your installed version.

After capsem update lands a new version, regenerate the completion file. The script is static — it doesn’t call back into the binary at runtime.