Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add custom bash completion #712

Closed
wants to merge 3 commits into from
Closed

[WIP] Add custom bash completion #712

wants to merge 3 commits into from

Conversation

eddiezane
Copy link
Contributor

@eddiezane eddiezane commented Dec 7, 2019

Figured out how to implement this. It required updating Cobra.

Adding the remaining resources won't be too difficult - just tedious.

Still need to figure out how to handle nested completion like:

doctl kubernetes cluster node-pool get <cluster-id|cluster-name> <pool-id|pool-name>

Closes #699

Signed-off-by: Eddie Zaneski <[email protected]>
Signed-off-by: Eddie Zaneski <[email protected]>
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We check the vendor/ directory into source. Can you run make vendor and commit those changes?

@andrewsomething andrewsomething self-requested a review January 8, 2020 21:27
@chrisshroba
Copy link

I see that Cobra supports auto-generating completion functions for multiple shells (bash, zsh, fish, powershell). Would you consider modifying to use that method, so we get completion in multiple shells for free? If not, I can try my hand at it.

@eddiezane
Copy link
Contributor Author

@chrisshroba please feel free to take over!

It will be good to hear your experience working with the new Cobra features. We've been looking into this for kubectl.

Hopefully some good guidance for you here:
kubernetes/kubectl#882
kubernetes/kubernetes#93714

@eddiezane eddiezane marked this pull request as draft October 7, 2020 17:28
@eddiezane eddiezane closed this Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tab completion for resource names
3 participants