doctl
doctl copied to clipboard
Add tab completion for resource names
Example: doctl kubernetes cluster kubeconfig save [tab] would suggest existing clusters to tab complete.
kubectl does this for all existing resources. Looks like the implementation is here.
Figuring out how this works should only be difficult for the first resource we implement it on.
https://github.com/spf13/cobra/blob/master/bash_completions.md#creating-your-own-custom-functions
edit: after some fumbling around cobra needs to be updated to v0.0.5 for this to work.