Generate autocompletion script for the specified shell
Generate autocompletion script for lokoctl for the specified shell (bash or zsh).
# Load the lokoctl completion code for bash into the current shell.
source <(lokoctl completion bash)
# Load the lokoctl completion code for zsh into the current shell.
source <(lokoctl completion zsh)
# Generate Bash completion file and load it for every shell.
lokoctl completion zsh > ~/.bash_lokoctl_completion
echo "source ~/.bash_lokoctl_completion" >> ~/.bashrc && source ~/.bashrc
# Set the lokoctl completion code for zsh to autoload on startup.
lokoctl completion zsh > "${fpath[1]}/_lokoctl" && exec $SHELL
-h, --help help for completion
--kubeconfig-file string Path to a kubeconfig file. If empty, the following precedence order is used:
1. Cluster asset dir when a lokocfg file is present in the current directory.
2. KUBECONFIG environment variable.
3. ~/.kube/config file.
--lokocfg string Path to lokocfg directory or file (default "./")
--lokocfg-vars string Path to lokocfg.vars file (default "./lokocfg.vars")
- lokoctl - Manage Lokomotive clusters
- lokoctl completion bash - Generate autocompletion script for bash
- lokoctl completion zsh - Generate autocompletion script for zsh