Add zsh/oh my zsh/w10k

This commit is contained in:
Tim
2020-01-22 17:37:20 +01:00
committed by Tim
parent ca9600417a
commit 55329b15f9
839 changed files with 62270 additions and 13 deletions

View File

@ -0,0 +1,18 @@
#compdef kubectx kctx=kubectx
local KUBECTX="${HOME}/.kube/kubectx"
PREV=""
local all_contexts="$(kubectl config get-contexts --output='name')"
if [ -f "$KUBECTX" ]; then
# show '-' only if there's a saved previous context
local PREV=$(cat "${KUBECTX}")
_arguments \
"-d:*: :(${all_contexts})" \
"(- *): :(- ${all_contexts})"
else
_arguments \
"-d:*: :(${all_contexts})" \
"(- *): :(${all_contexts})"
fi