CLI Shell Completions
Enable tab completion for kubeadapt in Bash, Zsh, Fish, and PowerShell. Includes persistent setup instructions for each shell.
kubeadapt can generate completion scripts for Bash, Zsh, Fish, and PowerShell. Once installed, pressing Tab completes command names and flags.
Bash
Source the completion script in your current session:
source <(kubeadapt completion bash)To make it permanent on Linux, write the script to the completions directory:
kubeadapt completion bash > /etc/bash_completion.d/kubeadaptOn macOS with Homebrew:
kubeadapt completion bash > $(brew --prefix)/etc/bash_completion.d/kubeadaptThen restart your shell or run source ~/.bashrc.
Zsh
Source the completion script in your current session:
source <(kubeadapt completion zsh)To make it permanent, write the script to a directory on your fpath:
kubeadapt completion zsh > "${fpath[1]}/_kubeadapt"If you haven't enabled Zsh completions yet, add this to your ~/.zshrc before the fpath line above:
autoload -Uz compinit
compinit
Then restart your shell.
Fish
Source the completion script in your current session:
kubeadapt completion fish | sourceTo make it permanent, write the script to the Fish completions directory:
kubeadapt completion fish > ~/.config/fish/completions/kubeadapt.fishFish picks up completions in that directory automatically on the next shell start.
PowerShell
Source the completion script in your current session:
kubeadapt completion powershell | Out-String | Invoke-ExpressionTo make it permanent, add that line to your PowerShell profile ($PROFILE). If the profile file doesn't exist yet, create it first:
New-Item -ItemType File -Path $PROFILE -Force
Add-Content $PROFILE 'kubeadapt completion powershell | Out-String | Invoke-Expression'Related
- Command Reference: explore commands with tab completion enabled
- Examples: copy-paste workflows