From 00df48fb9cc286e0ba90895bbf93135601c88cb7 Mon Sep 17 00:00:00 2001 From: Bastian Klein Date: Wed, 28 Jun 2017 20:49:52 +0200 Subject: [PATCH] Fix installing autocompletion documentation (#4189) * Fix installing autocompletion documentation The written solution did not work for me with the error `-bash: __git_ps1: command not found`. Since the auto-completion is already installed you can simply add the Kubernetes autocompletion to it. * Remove sourcing bash-completion in .bash_profile --- docs/tasks/tools/install-kubectl.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/tasks/tools/install-kubectl.md b/docs/tasks/tools/install-kubectl.md index 4c84c348fd..df655eb7a5 100644 --- a/docs/tasks/tools/install-kubectl.md +++ b/docs/tasks/tools/install-kubectl.md @@ -183,12 +183,10 @@ Follow the "caveats" section of brew's output to add the appropriate bash comple If you've installed kubectl using the [Homebrew instructions](#install-with-homebrew-on-macos) then kubectl completion should start working immediately. -If you have installed kubectl manually, then run: `source <(kubectl completion bash)` - -To add kubectl autocompletion to your profile (so it is automatically loaded in future shells): +If you have installed kubectl manually, you need to add kubectl autocompletion to the bash-completion: ```shell -echo "source <(kubectl completion bash)" >> ~/.bash_profile +kubectl completion bash > $(brew --prefix)/etc/bash_completion.d/kubectl ``` The Homebrew project is independent from kubernetes, so the bash-completion packages are not guaranteed to work.