bashcompletions: suggest resources to delete in kubectl delete

Before this patch if you type `kubectl delete [tab][tab]` you would get
nothing.  `kubectl delete pod [tab][tab]` would show the list of pods.
This patch causes `kubectl delete [tab][tab]` to show the list of
resources like pod, service, podtemplate, serviceaccount, etc
This commit is contained in:
Eric Paris
2015-05-23 16:56:16 -04:00
parent 27599b9164
commit 9b2ac7538d
2 changed files with 19 additions and 0 deletions

View File

@@ -420,6 +420,21 @@ _kubectl_delete()
must_have_one_flag=()
must_have_one_noun=()
must_have_one_noun+=("componentstatus")
must_have_one_noun+=("endpoints")
must_have_one_noun+=("event")
must_have_one_noun+=("limitrange")
must_have_one_noun+=("namespace")
must_have_one_noun+=("node")
must_have_one_noun+=("persistentvolume")
must_have_one_noun+=("persistentvolumeclaim")
must_have_one_noun+=("pod")
must_have_one_noun+=("podtemplate")
must_have_one_noun+=("replicationcontroller")
must_have_one_noun+=("resourcequota")
must_have_one_noun+=("secret")
must_have_one_noun+=("service")
must_have_one_noun+=("serviceaccount")
}
_kubectl_namespace()