Skip to content

Commit cde216e

Browse files
Use tee to write to /etc/bash_completion.d/kubectl
1 parent 2c6a411 commit cde216e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/en/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You now need to ensure that the kubectl completion script gets sourced in all yo
3737
- Add the completion script to the `/etc/bash_completion.d` directory:
3838

3939
```bash
40-
kubectl completion bash >/etc/bash_completion.d/kubectl
40+
echo -e "$(kubectl completion bash)" | sudo tee /etc/bash_completion.d/kubectl > /dev/null
4141
```
4242

4343
If you have an alias for kubectl, you can extend shell completion to work with that alias:

0 commit comments

Comments
 (0)