CmdID

CmdID / Commands

kubectl-completion

Generate shell completion code for kubectl commands. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Print the completion script for Bash, Zsh, fish, or PowerShell

kubectl completion bashIdentify

Load Bash or Zsh completions into the current shell session

source <(kubectl completion bash)Identify

Append Bash completion script to ~/.bashrc

kubectl completion bash >>~/.bashrcIdentify

Write Zsh completion script to a file in the fpath

kubectl completion zsh >"${fpath[1]}/_kubectl"Identify

Load fish completions into the current shell session

kubectl completion fish | sourceIdentify

Persist fish completions

kubectl completion fish >~/.config/fish/completions/kubectl.fishIdentify

Load PowerShell completions into the current shell session

kubectl completion powershell | Out-String | Invoke-ExpressionIdentify

Persist PowerShell completions

kubectl completion powershell >>$PROFILEIdentify