Shell completions
agentop emits completion scripts for the most common shells. The scripts go to stdout; redirect them to whatever your shell reads.
Supported shells
| Shell | Generate |
|---|---|
| bash | agentop --generate-completions bash |
| zsh | agentop --generate-completions zsh |
| fish | agentop --generate-completions fish |
| powershell | agentop --generate-completions powershell |
| elvish | agentop --generate-completions elvish |
Installing
zsh
mkdir -p ~/.zsh/completions
agentop --generate-completions zsh > ~/.zsh/completions/_agentop
Then in your ~/.zshrc, before compinit:
fpath=(~/.zsh/completions $fpath)
autoload -U compinit && compinit
bash
mkdir -p ~/.local/share/bash-completion/completions
agentop --generate-completions bash > ~/.local/share/bash-completion/completions/agentop
fish
agentop --generate-completions fish > ~/.config/fish/completions/agentop.fish
How it works
The scripts are generated by clap_complete
from the same CLI definition the binary uses. They stay in sync with the
real flags automatically.