From b1b2fe7894202f6e3880fa63f2bfc84fbd4ad324 Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Thu, 11 Jul 2024 21:00:17 +0800 Subject: [PATCH] feat: kubectl auto completion support --- zsh/zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zsh/zshrc b/zsh/zshrc index 50e07c7..723d2a3 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -122,6 +122,9 @@ zinit snippet OMZP::gem # docker zinit snippet OMZP::docker-compose +# kubernetes +zinit snippet OMZP::kubectl + # others zinit snippet OMZP::history zinit snippet OMZP::textmate @@ -300,6 +303,11 @@ eval "$(starship init zsh)" eval "$(z init zsh)" +# kubectl auto completion +if command -v kubectl &>/dev/null; then + source <(kubectl completion zsh) +fi + # Clean filesystem user watches function fs-watcher-clean() { if [[ "$OSTYPE" == "darwin"* ]]; then