Bash Autocompletion Generator#69
Merged
Merged
Conversation
Collaborator
Author
|
Requires spf13/pflag#8 before this will build |
94e3bc2 to
9d6aada
Compare
eparis
added a commit
to eparis/kubernetes
that referenced
this pull request
Mar 18, 2015
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
Collaborator
Author
|
I pulled out annotations and hard coded a new "ValidArgs" field. We don't really validate them, but we certainly could... |
Collaborator
Author
|
An example of what this can do: |
Contributor
|
@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
Collaborator
Author
|
Now with 55% more README and 32% more tests! |
Contributor
|
Very nice! I could think of a better integration of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That's right. A golang program the writes a bash program!