mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-07-17 00:31:28 +00:00
Merge 6e0a1591e0
into 013b6bc252
This commit is contained in:
commit
8992b10336
6
kubectx
6
kubectx
@ -108,7 +108,11 @@ save_context() {
|
||||
}
|
||||
|
||||
switch_context() {
|
||||
$KUBECTL config use-context "${1}"
|
||||
if [ "$(get_contexts | grep -c "${1}")" -eq 1 ]; then
|
||||
$KUBECTL config use-context "$(get_contexts | grep "${1}")"
|
||||
else
|
||||
$KUBECTL config use-context "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
choose_context_interactive() {
|
||||
|
Loading…
Reference in New Issue
Block a user