Skip to content

Commit 8ec7897

Browse files
authored
Merge pull request #40331 from utkarsh-singh1/update-docs-reference-kubectl-cheatsheet-md
Added kubectl completion command for fish shell in kubect cheatsheet docmentation
2 parents 635cae7 + 92fbd57 commit 8ec7897

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ complete -o default -F __start_kubectl k
4242
source <(kubectl completion zsh) # set up autocomplete in zsh into the current shell
4343
echo '[[ $commands[kubectl] ]] && source <(kubectl completion zsh)' >> ~/.zshrc # add autocomplete permanently to your zsh shell
4444
```
45+
46+
### FISH
47+
48+
Require kubectl version 1.23 or above.
49+
50+
```bash
51+
echo 'kubectl completion fish | source' >> ~/.config/fish/config.fish # add kubectl autocompletion permanently to your fish shell
52+
```
53+
4554
### A note on `--all-namespaces`
4655

4756
Appending `--all-namespaces` happens frequently enough that you should be aware of the shorthand for `--all-namespaces`:

0 commit comments

Comments
 (0)