bash_completions: annotate kubectl get with resources which can be 'gotten'

A user types:
  kubectl get $resource

This will cause the bash completions to suggest the possible objects the
user can ask for.  The complete list right now is:

endpoints
event
limitrange
namespace
node
persistentvolume
persistentvolumeclaim
pod
replicationcontroller
resourcequota
secret
service
status

But this list should stay up2date as api objects are added or deleted
This commit is contained in:
Eric Paris
2015-03-17 13:01:57 -04:00
parent 5b8a426d01
commit c75ecbd8e3
3 changed files with 33 additions and 0 deletions

View File

@@ -175,6 +175,19 @@ _kubectl_get()
must_have_one_flag=()
must_have_one_noun=()
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+=("replicationcontroller")
must_have_one_noun+=("resourcequota")
must_have_one_noun+=("secret")
must_have_one_noun+=("service")
must_have_one_noun+=("status")
}
_kubectl_describe()