doctl icon indicating copy to clipboard operation
doctl copied to clipboard

Add tab completion for resource names

Open eddiezane opened this issue 6 years ago • 1 comments

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.

eddiezane avatar Nov 15 '19 23:11 eddiezane

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.

eddiezane avatar Dec 07 '19 00:12 eddiezane