Shell Completion
Available subcommands
Section titled “Available subcommands”keel completion bashkeel completion zshkeel completion fishkeel completion powershellkeel completion installAutomatic installation
Section titled “Automatic installation”keel completion installWhat install does
Section titled “What install does”- Resolves your shell (
zsh,bash,fish; in some flows it selects by$SHELLand found config files). - Generates the completion script.
- Saves it to:
~/.config/keel/completion/keel.<shell>
- Adds a
source "..."line to the shell config file.
Candidate config files
Section titled “Candidate config files”zsh:~/.zshrc,~/.zprofilebash:~/.bashrc,~/.bash_profile,~/.profilefish:~/.config/fish/config.fish
If multiple candidates are found and there is an interactive terminal, the CLI asks which one to update.
Manual installation
Section titled “Manual installation”mkdir -p ~/.config/keel/completionkeel completion zsh > ~/.config/keel/completion/keel.zshecho 'source "$HOME/.config/keel/completion/keel.zsh"' >> ~/.zshrcmkdir -p ~/.config/keel/completionkeel completion bash > ~/.config/keel/completion/keel.bashecho 'source "$HOME/.config/keel/completion/keel.bash"' >> ~/.bashrcmkdir -p ~/.config/keel/completionkeel completion fish > ~/.config/keel/completion/keel.fishecho 'source "$HOME/.config/keel/completion/keel.fish"' >> ~/.config/fish/config.fishPowerShell
Section titled “PowerShell”keel completion powershell > $HOME\keel.ps1. $HOME\keel.ps1Verify
Section titled “Verify”Open a new terminal and test:
keel <TAB>keel generate <TAB>Idempotent behavior
Section titled “Idempotent behavior”keel completion install avoids duplicating the same source line when it already exists.
Quick troubleshooting
Section titled “Quick troubleshooting”- Open a new shell session after installing.
- Check which file the
sourcewas written to. - If you changed your default shell, run
keel completion installagain.