Skip to content

completions

Prints a shell completion script for kasl on stdout. Source it from your shell profile to get tab-completion for commands, subcommands, and flags.

Terminal window
kasl completions <SHELL>

<SHELL> is one of bash, zsh, fish, powershell, or elvish.

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

Or source it directly from ~/.bashrc:

Terminal window
eval "$(kasl completions bash)"
Terminal window
kasl completions zsh > ~/.zfunc/_kasl

Make sure ~/.zfunc is on your fpath before compinit runs in ~/.zshrc:

Terminal window
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit
Terminal window
kasl completions fish > ~/.config/fish/completions/kasl.fish

Append to your profile ($PROFILE):

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

To make it permanent:

Terminal window
kasl completions powershell >> $PROFILE
Terminal window
kasl completions elvish > ~/.elvish/lib/kasl.elv

The script is generated from kasl’s own command definitions, so it always matches the installed version. Regenerate it after updating kasl if you wrote the output to a file rather than sourcing it dynamically.