mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-06-27 07:46:49 +00:00
zsh: fix kubectx completion for 2+ contexts (#81)
fixes #68 Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
ccc077b6c5
commit
365fa23d87
@ -5,8 +5,8 @@ PREV=""
|
|||||||
if [ -f "$KUBECTX" ]; then
|
if [ -f "$KUBECTX" ]; then
|
||||||
# show '-' only if there's a saved previous context
|
# show '-' only if there's a saved previous context
|
||||||
local PREV=$(cat "${KUBECTX}")
|
local PREV=$(cat "${KUBECTX}")
|
||||||
_arguments "1: :((- \
|
_arguments "1: :(-
|
||||||
$(kubectl config get-contexts --output='name')))"
|
$(kubectl config get-contexts --output='name'))"
|
||||||
else
|
else
|
||||||
_arguments "1: :($(kubectl config get-contexts --output='name'))"
|
_arguments "1: :($(kubectl config get-contexts --output='name'))"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user