evanlucas / fish-kubectl-completions

kubectl completions for fish shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for completions for custom resource definitions

evanlucas opened this issue · comments

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.

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

Initial implementation was landed in e873cd9