Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Move shell completion generation into 'kubectl completion' command #23801
Remove static shell completion scripts from the repo and add
$ source <(kubectl completion 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
Very good question. I reimplement a number of missing functions that are not part of the zsh completion environment to make it work, of course only as far as necessary for kubectl. This is not really a "just-works" situation for other programs based on cobra, depending especially on custom functions.
Let me check in detail.
On Mon, May 9, 2016 at 2:53 PM, Kubernetes Bot firstname.lastname@example.org