-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"oc config use-context" should complete contexts #372
Comments
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/remove-lifecycle rotten |
kubectl config use-context
can complete contexts.oc config use-context
cannot. Being able to complete contexts would be quite helpful in its own right, but especially so sinceoc login
clobbers kubeconfig contexts while simultaneouslyoc
breakskubectl
's ability to complete contexts.One way to accomplish this would be to piggy-back
kubectl
's context completion by adding.to
__custom_func
, and optionallyafter every
flags+=("--context=")
The downside to that approach is the dependency on
kubectl
completion, without which you get something likeoc create clusterrolebinding
already delegates to__kubectl_get_resource_clusterrule
so there is precedence, however, I'd personally consider contexts to be a far more prominent concept than cluster role bindings.In a similar vein, clusters and users could be completed with
__kubectl_config_get_clusters
and__kubectl_config_get_users
.An even simpler way to resolve this is to resolve #371 and declare these completions outside of
oc
's scope.The text was updated successfully, but these errors were encountered: