fish auto-completion
Optional configuration to enable fish shell auto-completion.
Note: Autocomplete for Fish requires kubectl 1.23 or later.
The kubectl completion script for Fish can be generated with the command kubectl completion fish
. Sourcing the completion script in your shell enables kubectl autocompletion.
To do so in all your shell sessions, add the following line to your ~/.config/fish/config.fish
file:
kubectl completion fish | source
After reloading your shell, kubectl autocompletion should be working.
Last modified December 06, 2022 at 11:56 AM PST: add version support to `fish` auto-completion (48550eb912)