mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-09-15 23:38:24 +00:00
Fix context discovery
This commit is contained in:
@@ -6,7 +6,7 @@ if [ -f "$KUBECTX" ]; then
|
||||
# show '-' only if there's a saved previous context
|
||||
PREV=$(cat "${KUBECTX}")
|
||||
_arguments "1: :((-\:Back\ to\ ${PREV} \
|
||||
$(kubectl config get-contexts | awk '{print $2}' | tail -n +2)))"
|
||||
$(kubectl config get-contexts --output='name')))"
|
||||
else
|
||||
_arguments "1: :($(kubectl config get-contexts | awk '{print $2}' | tail -n +2))"
|
||||
_arguments "1: :($(kubectl config get-contexts --output='name'))"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user