* 'master' of https://github.com/kubernetes/kubernetes.github.io:
  Make issue title automatically a link
  Update directions for macOS bash completion
This commit is contained in:
Andrew Chen
2017-06-06 09:24:27 -07:00
2 changed files with 21 additions and 20 deletions
+1 -1
View File
@@ -65,7 +65,7 @@
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
</script>
<a href="" onclick="window.open('https://github.com/kubernetes/kubernetes.github.io/issues/new?title=Issue%20with%20' +
window.location.pathname)" class="button issue">Create an Issue</a>
'k8s.io'+window.location.pathname)" class="button issue">Create an Issue</a>
<a href="/editdocs#{{ page.path }}" class="button issue">Edit this Page</a>
{% endif %}
</div>
+11 -10
View File
@@ -142,28 +142,29 @@ echo "source <(kubectl completion bash)" >> ~/.bashrc
```
### On macOS, using bash
On macOS, autocompletion works if you install using `brew install kubectl`,
and not if you downloaded kubectl directly.
Install the bash-completion support:
On macOS, you will need to install bash-completion support via [Homebrew](https://brew.sh/) first:
```shell
## If running Bash 3.2 included with macOS
brew install bash-completion
## or, if running Bash 4.1+
bash install bash-completion@2
```
To add kubectl autocompletion to your current shell, run:
Follow the "caveats" section of brew's output to add the appropriate bash completion path to your local .bashrc.
```shell
source $(brew --prefix)/etc/bash_completion
source <(kubectl completion bash)
```
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):
```shell
echo "source $(brew --prefix)/etc/bash_completion" >> ~/.bash_profile
echo "source <(kubectl completion bash)" >> ~/.bash_profile
```
The Homebrew project is independent from kubernetes, so the bash-completion packages are not guaranteed to work.
{% endcapture %}
{% capture whatsnext %}
[Learn how to launch and expose your application.](/docs/user-guide/quick-start)