-
Notifications
You must be signed in to change notification settings - Fork 9.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
etcdctl: add command to generate shell completion #13133
Conversation
To improve the UX of etcdctl. Completion is generated by cobra according to defined commands and flags. Fixes etcd-io#13111
Nice. Could you please add an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Works like a charm 🎉 👍
Would you mind adding it for etcdutl
in a follow up maybe?
@ptabor should we add this to the release notes as well what do you think?
@ptabor +1 for release notes. The notable first entry for 3.6. |
I'll look into writing tests. Do you mean one for one shell only?
Sure, I can do that. |
Yes - mostly to make sure someone didn't turned off the group incidentally.
|
a609d35
to
96b8049
Compare
@ptabor I've added a really basic test that verifies the generated shell code is valid. Testing the completion itself is kind of tricky and probably not feasible in a non-interactive environment. I could add some test cases for the hidden The test is for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great . Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 🎉
To improve the UX of etcdctl. Completion is generated by cobra
according to defined commands and flags.
Fixes #13111