Use tee to write to /etc/bash_completion.d/kubectl
This commit is contained in:
@@ -37,7 +37,7 @@ You now need to ensure that the kubectl completion script gets sourced in all yo
|
|||||||
- Add the completion script to the `/etc/bash_completion.d` directory:
|
- Add the completion script to the `/etc/bash_completion.d` directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl completion bash >/etc/bash_completion.d/kubectl
|
echo -e "$(kubectl completion bash)" | sudo tee /etc/bash_completion.d/kubectl > /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have an alias for kubectl, you can extend shell completion to work with that alias:
|
If you have an alias for kubectl, you can extend shell completion to work with that alias:
|
||||||
|
|||||||
Reference in New Issue
Block a user