{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/23801","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/23801/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/23801/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/23801/events","html_url":"https://github.com/kubernetes/kubernetes/pull/23801","id":145521633,"number":23801,"title":"Move shell completion generation into 'kubectl completion' command","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars.githubusercontent.com/u/730123?v=3","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/old-docs","name":"kind/old-docs","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XL","name":"size/XL","color":"ee5500"}],"state":"open","locked":false,"assignee":{"login":"eparis","id":8093535,"avatar_url":"https://avatars.githubusercontent.com/u/8093535?v=3","gravatar_id":"","url":"https://api.github.com/users/eparis","html_url":"https://github.com/eparis","followers_url":"https://api.github.com/users/eparis/followers","following_url":"https://api.github.com/users/eparis/following{/other_user}","gists_url":"https://api.github.com/users/eparis/gists{/gist_id}","starred_url":"https://api.github.com/users/eparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparis/subscriptions","organizations_url":"https://api.github.com/users/eparis/orgs","repos_url":"https://api.github.com/users/eparis/repos","events_url":"https://api.github.com/users/eparis/events{/privacy}","received_events_url":"https://api.github.com/users/eparis/received_events","type":"User","site_admin":false},"milestone":null,"comments":16,"created_at":"2016-04-03T17:31:04Z","updated_at":"2016-05-17T19:53:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/23801","html_url":"https://github.com/kubernetes/kubernetes/pull/23801","diff_url":"https://github.com/kubernetes/kubernetes/pull/23801.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/23801.patch"},"body":"Remove static shell completion scripts from the repo and add `completion` command to kubectl:\r\n\r\n```bash\r\n$ source <(kubectl completion bash)\r\n```\r\n\r\nor\r\n\r\n```bash\r\n$ source <(kubectl completion zsh)\r\n```\r\n\r\nThis makes maintenance easier because no static scripts must be generated and committed anymore in the repo.\r\n\r\nMoreover, 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.\r\n\r\nOpinions are welcome /cc @eparis @nak3\n\n<!-- Reviewable:start -->\n---\nThis 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)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/219833800","html_url":"https://github.com/kubernetes/kubernetes/pull/23801#issuecomment-219833800","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/23801","id":219833800,"user":{"login":"sttts","id":730123,"avatar_url":"https://avatars.githubusercontent.com/u/730123?v=3","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T19:53:33Z","updated_at":"2016-05-17T19:53:33Z","body":"@k8s-bot test this issue: #25760"}}