kubectl-completion
Generate shell completion code for kubectl commands. tldr-pages
On several platforms
Several platforms
Print the completion script for Bash, Zsh, fish, or PowerShell
kubectl completion bashIdentifyLoad Bash or Zsh completions into the current shell session
source <(kubectl completion bash)IdentifyAppend Bash completion script to ~/.bashrc
kubectl completion bash >>~/.bashrcIdentifyWrite Zsh completion script to a file in the fpath
kubectl completion zsh >"${fpath[1]}/_kubectl"IdentifyLoad fish completions into the current shell session
kubectl completion fish | sourceIdentifyPersist fish completions
kubectl completion fish >~/.config/fish/completions/kubectl.fishIdentifyLoad PowerShell completions into the current shell session
kubectl completion powershell | Out-String | Invoke-ExpressionIdentifyPersist PowerShell completions
kubectl completion powershell >>$PROFILEIdentify