evanlucas / fish-kubectl-completions

kubectl completions for fish shell
MIT License
576 stars 42 forks source link

Add support for completions for custom resource definitions #6

Closed evanlucas closed 6 years ago

evanlucas commented 6 years ago

Not sure if this is the most efficient way, but the following works to get custom resource definitions.

kubectl get crd -o yaml | egrep '      plural|      singular' | awk '{print $2}' | sort -u

Do CRDs have a description? If so, it would be cool to include those in the resources.

evanlucas commented 6 years ago

kubectl get crd -o jsonpath='{.items[*].spec.names[\'plural\',\'singular\']}' would probably be a better way to include those

evanlucas commented 6 years ago

Initial implementation was landed in e873cd9acc9cfd4dceaec9c43beb31b022f01236