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