3 ms·
Are you familiar with https://github.com/spf13/cobra https://github.com/spf13/cobra? It's used by a few heavy hitters (kubernetes's kubectl) and it provides yo
by pgwhalen 8y ago
Are you familiar with https://github.com/spf13/cobra https://github.com/spf13/cobra? It's used by a few heavy hitters (kubernetes's kubectl) and it provides you a bit of help with bash completion: https://github.com/spf13/cobra/blob/master/bash_completions.md https://github.com/spf13/cobra/blob/master/bash_completions....
I just added bash completion to a few internal tools that work with kafka, basically just autocompleting topics. It was a little harder than I would have liked (who wants to write all that bash), and I had to fix a bug in Cobra, but overall it wasn't that bad.
I'm actually at Gophercon right now, if anyone wants to hack on Cobra at the community day on Thursday to make this easier, shoot me an email (@gmail).