mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2026-01-11 17:45:38 +00:00
Automatic merge from submit-queue Move shell completion generation into 'kubectl completion' command Remove static shell completion scripts from the repo and add `completion` command to kubectl: ```bash $ source <(kubectl completion bash) ``` or ```bash $ source <(kubectl completion zsh) ``` This makes maintenance easier because no static scripts must be generated and committed anymore in the repo. Moreover, kubectl is self-contained again for the user including the latest completion code. I am thinking about the use-case of updating kubectl via gcloud (or some package manager). The completion code is always in-sync, without the need to download a `contrib/completion/bash/kubectl` file from github. Opinions are welcome /cc @eparis @nak3 Fixes https://github.com/openshift/origin/issues/5290 <!-- Reviewable:start --> --- This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/23801) <!-- Reviewable:end -->