From 64ea3c0837834013b2592d3518c16c98257d0323 Mon Sep 17 00:00:00 2001 From: Mohammad Jolani Date: Thu, 19 Sep 2024 13:39:28 +0300 Subject: [PATCH 1/2] feat(kubectl): add alias for unset current-context --- plugins/kubectl/kubectl.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index 33699bdf9..2408e63a4 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -29,6 +29,7 @@ alias kcuc='kubectl config use-context' alias kcsc='kubectl config set-context' alias kcdc='kubectl config delete-context' alias kccc='kubectl config current-context' +alias kucc='kubectl config unset current-context' # List all contexts alias kcgc='kubectl config get-contexts' From 5817e0a3c38ddf6458351057f138f2ef64ce17ea Mon Sep 17 00:00:00 2001 From: Mohammad Jolani Date: Thu, 19 Sep 2024 13:42:23 +0300 Subject: [PATCH 2/2] Update README.md --- plugins/kubectl/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md index 28a502d11..9fc5290e2 100644 --- a/plugins/kubectl/README.md +++ b/plugins/kubectl/README.md @@ -20,6 +20,7 @@ plugins=(... kubectl) | | | **Manage configuration quickly to switch contexts between local, dev and staging** | | kcuc | `kubectl config use-context` | Set the current-context in a kubeconfig file | | kcsc | `kubectl config set-context` | Set a context entry in kubeconfig | +| kucc | `kubectl config unset current-context` | Unset the current-context in a kubeconfig file | | kcdc | `kubectl config delete-context` | Delete the specified context from the kubeconfig | | kccc | `kubectl config current-context` | Display the current-context | | kcgc | `kubectl config get-contexts` | List of contexts available |