Skip to content

Commit e1a1a95

Browse files
authored
Merge pull request #32127 from mtovmassian/fix-en-bash-alias-auto-completion
[en] Update Bash alias auto-completion
2 parents 2d869fc + d05fb62 commit e1a1a95

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can also use a shorthand alias for `kubectl` that also works with completion
3030

3131
```bash
3232
alias k=kubectl
33-
complete -F __start_kubectl k
33+
complete -o default -F __start_kubectl k
3434
```
3535

3636
### ZSH

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
@@ -43,7 +43,7 @@ If you have an alias for kubectl, you can extend shell completion to work with t
4343

4444
```bash
4545
echo 'alias k=kubectl' >>~/.bashrc
46-
echo 'complete -F __start_kubectl k' >>~/.bashrc
46+
echo 'complete -o default -F __start_kubectl k' >>~/.bashrc
4747
```
4848

4949
{{< note >}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ You now have to ensure that the kubectl completion script gets sourced in all yo
7777

7878
```bash
7979
echo 'alias k=kubectl' >>~/.bash_profile
80-
echo 'complete -F __start_kubectl k' >>~/.bash_profile
80+
echo 'complete -o default -F __start_kubectl k' >>~/.bash_profile
8181
```
8282

8383
- If you installed kubectl with Homebrew (as explained [here](/docs/tasks/tools/install-kubectl-macos/#install-with-homebrew-on-macos)), then the kubectl completion script should already be in `/usr/local/etc/bash_completion.d/kubectl`. In that case, you don't need to do anything.

0 commit comments

Comments
 (0)