mirror of https://github.com/k3s-io/k3s
Fix wrong completion for kubectl attach
Although `kubectl attach POD_NAME <tab>` completes container name, kubectl attach needs `-c` option so the command causes error as: ``` $ kubectl attach nginx-7cdbd8cdc9-b5rhr nginx error: the server doesn't have a resource type "nginx-7cdbd8cdc9-b5rhr" ``` This patch changes the completion to the same way as `kubectl exec`.pull/564/head
parent
13e59ab9ad
commit
f7aca76bac
|
@ -248,11 +248,11 @@ __custom_func() {
|
|||
__kubectl_get_resource
|
||||
return
|
||||
;;
|
||||
kubectl_logs | kubectl_attach)
|
||||
kubectl_logs)
|
||||
__kubectl_require_pod_and_container
|
||||
return
|
||||
;;
|
||||
kubectl_exec | kubectl_port-forward | kubectl_top_pod)
|
||||
kubectl_exec | kubectl_port-forward | kubectl_top_pod | kubectl_attach)
|
||||
__kubectl_get_resource_pod
|
||||
return
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue