Enable command completion

Completion allows you to hit [TAB] on a partially entered kalix command and have the shell complete the command, subcommand or flag for you.

bash

To load completion in the current bash shell run:

source <(kalix completion)

Configure bash to load kalix completions for each session by adding the following line to your ~/.bashrc or ~/.profile file:

# add to ~/.bashrc or ~/.profile
source <(kalix completion)

Using bash completions with kalix requires you have bash completions enabled to begin with. Enable it in your ~/.bashrc or ~/.profile file with the following lines:

if [ -f /etc/bash_completion ]; then
  source /etc/bash_completion
fi

For definitive details on setting up your shell with auto-completion, see the shell documentation.

zsh (e.g. macOS)

To set up zsh shell completion run:

kalix completion zsh > "${fpath[1]}/_kalix"
compinit

If shell completion is not already enabled in your environment execute the following:

echo "autoload -U compinit; compinit" >> ~/.zshrc
fish

To set up fish shell completion run:

kalix completion fish > ~/.config/fish/completions/kalix.fish
source ~/.config/fish/completions/kalix.fish
PowerShell

To set up shell completion for PowerShell run:

kalix completion powershell | Out-String | Invoke-Expression