Skip to content

Shell Completion

Terminal window
keel completion bash
keel completion zsh
keel completion fish
keel completion powershell
keel completion install
Terminal window
keel completion install
  1. Resolves your shell (zsh, bash, fish; in some flows it selects by $SHELL and found config files).
  2. Generates the completion script.
  3. Saves it to:
    • ~/.config/keel/completion/keel.<shell>
  4. Adds a source "..." line to the shell config file.
  • zsh: ~/.zshrc, ~/.zprofile
  • bash: ~/.bashrc, ~/.bash_profile, ~/.profile
  • fish: ~/.config/fish/config.fish

If multiple candidates are found and there is an interactive terminal, the CLI asks which one to update.

Terminal window
mkdir -p ~/.config/keel/completion
keel completion zsh > ~/.config/keel/completion/keel.zsh
echo 'source "$HOME/.config/keel/completion/keel.zsh"' >> ~/.zshrc
Terminal window
mkdir -p ~/.config/keel/completion
keel completion bash > ~/.config/keel/completion/keel.bash
echo 'source "$HOME/.config/keel/completion/keel.bash"' >> ~/.bashrc
Terminal window
mkdir -p ~/.config/keel/completion
keel completion fish > ~/.config/keel/completion/keel.fish
echo 'source "$HOME/.config/keel/completion/keel.fish"' >> ~/.config/fish/config.fish
Terminal window
keel completion powershell > $HOME\keel.ps1
. $HOME\keel.ps1

Open a new terminal and test:

Terminal window
keel <TAB>
keel generate <TAB>

keel completion install avoids duplicating the same source line when it already exists.

  • Open a new shell session after installing.
  • Check which file the source was written to.
  • If you changed your default shell, run keel completion install again.