-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Bash Autocompletion Generator #69
Conversation
Requires spf13/pflag#8 before this will build |
94e3bc2
to
9d6aada
Compare
This autocompletion code was developed using: spf13/cobra#69 Once that actually lands, we can autogenerate and make sure it never gets out of date!
9d6aada
to
a3cd8ac
Compare
a3cd8ac
to
fb50344
Compare
I pulled out annotations and hard coded a new "ValidArgs" field. We don't really validate them, but we certainly could... |
An example of what this can do: |
@eparis Add README docs about how to use it. |
Given a (potentially annotated) cobra command you can generate a bash completion script.
fb50344
to
a068307
Compare
Now with 55% more README and 32% more tests! |
Very nice! I could think of a better integration of |
That's right. A golang program the writes a bash program!