Skip to content

Commit 06dac1b

Browse files
authored
Merge pull request #36958 from aFlyBird0/update-bash-completion-macOS
[en] Fix homebrew prefix error in bash-completion of kubectl
2 parents 28caaa7 + 7dcfd54 commit 06dac1b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ brew install bash-completion@2
5151
As stated in the output of this command, add the following to your `~/.bash_profile` file:
5252

5353
```bash
54-
export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
55-
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
54+
brew_etc="$(brew --prefix)/etc" && [[ -r "${brew_etc}/profile.d/bash_completion.sh" ]] && . "${brew_etc}/profile.d/bash_completion.sh"
5655
```
5756

5857
Reload your shell and verify that bash-completion v2 is correctly installed with `type _init_completion`.

0 commit comments

Comments
 (0)