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
reviewable/pr4224/r1
Bastian Klein 2017-06-28 20:49:52 +02:00 committed by Andrew Chen
parent ad23d013d7
commit 00df48fb9c
1 changed files with 2 additions and 4 deletions

View File

@ -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.