Skip to content
Permalink
Browse files

zsh: fix kubectx completion for 2+ contexts (#81)

fixes #68

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
  • Loading branch information...
ahmetb committed Aug 31, 2018
1 parent ccc077b commit 365fa23d871e2d4b19d5fb7debe6ade52401a44c
Showing with 2 additions and 2 deletions.
  1. +2 −2 completion/kubectx.zsh
@@ -5,8 +5,8 @@ PREV=""
if [ -f "$KUBECTX" ]; then
# show '-' only if there's a saved previous context
local PREV=$(cat "${KUBECTX}")
_arguments "1: :((- \
$(kubectl config get-contexts --output='name')))"
_arguments "1: :(-
$(kubectl config get-contexts --output='name'))"
else
_arguments "1: :($(kubectl config get-contexts --output='name'))"
fi

0 comments on commit 365fa23

Please sign in to comment.
You can’t perform that action at this time.