The Kurtosis CLI supports tab completion for bash
, zsh
, and fish
via the kurtosis completion SHELL
command (e.g. kurtosis completion bash
). source
ing the output of the command will enable tab-completion, and adding the source
command to your shell config file will enable it across shells. The instructions below will get you set up for your shell.
NOTE: As of 2022-02-21, tab completion for all commands is available but intelligent tab completion for command parameters (e.g. kurtosis enclave inspect <TAB>
auto-completing enclave IDs) is still ongoing.
echo $BASH_VERSION
brew install bash
type _init_completion
-bash: type: _init_completion: not found
, install Bash completion:
brew install bash-completion@2
~/.bash_profile
:
export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
type _init_completion
kurtosis completion bash
in your Bash config file:
~/.bash_profile
file:
# Add Kurtosis tab-completion
source <(kurtosis completion bash)
~/.bashrc
file:
# Add Kurtosis tab-completion
source <(kurtosis completion bash)
kt
in the examples below):
~/.bash_profile
file:
# Add tab-completion to Kurtosis alias
complete -F __start_kurtosis kt
~/.bashrc
file:
# Add tab-completion to Kurtosis alias
complete -F __start_kurtosis kt
~/.zshrc
file:
# Add Kurtosis tab-completion
source <(kurtosis completion zsh)
~/.zshrc
file (we’ll assume the alias kt
in this example):
# Add tab-completion to Kurtosis alias
compdef __start_kurtosis kt
complete:13: command not found: compdef
, add the following to the top of your ~/.zshrc
and reload your shell again:
autoload -Uz compinit
compinit
~/.config/fish/config.fish
file:
# Add Kurtosis tab-completion
kurtosis completion fish | source