-
Notifications
You must be signed in to change notification settings - Fork 252
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
Update cobra to v1.2.1 and use built-in completion command #582
Merged
Conversation
This file contains 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
rolinh
added
⌨️ area/cli
Impacts the command line interface of any command in the repository.
release-note/misc
This PR makes changes that have no direct user impact.
breaking-change
Breaks compatibility with previous versions
labels
Jul 2, 2021
tklauser
approved these changes
Jul 2, 2021
glibsm
approved these changes
Jul 2, 2021
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.
awesome
rolinh
force-pushed
the
pr/rolinh/cobra-completion
branch
from
July 2, 2021 17:37
f1545f4
to
feb0a12
Compare
rolinh
changed the title
Update cobra to v1.2.0 and use built-in completion command
Update cobra to v1.2.1 and use built-in completion command
Jul 2, 2021
rolinh
added
release-note/minor
This PR introduces functionality that users may find relevant to operating Hubble.
and removed
release-note/misc
This PR makes changes that have no direct user impact.
labels
Jul 2, 2021
This new release of cobra improves completion support. Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
Since the release of cobra v1.2.0, a completion command is automatically created if none is provided. We therefore do not need to ship our own anymore. Note that this means two breaking changes: - Calling `hubble completion` without specifying a shell name no leads to printing out the help message for the command. Our implementation used to generate completion for bash. I think that, although breaking, this change is for the better. - We used to support `ps1` as an alias for `powershell` and the builtin subcommand does not. What we get is more uniformity for our users. Most CLI tools using cobra are likely to use the built-in command to generate shell completion rather than rolling their own. Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
rolinh
force-pushed
the
pr/rolinh/cobra-completion
branch
from
July 5, 2021 07:47
feb0a12
to
775c0c2
Compare
aanm
approved these changes
Jul 5, 2021
maintainer-s-little-helper
bot
added
the
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
label
Jul 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
⌨️ area/cli
Impacts the command line interface of any command in the repository.
breaking-change
Breaks compatibility with previous versions
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/minor
This PR introduces functionality that users may find relevant to operating Hubble.
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.
Since the release of cobra v1.2.0, a completion command is automatically
created if none is provided. We therefore do not need to ship our own
anymore.
Note that this means two breaking changes:
hubble completion
without specifying a shell name now leadsto printing out the help message for the command. Our implementation
used to generate completion for bash. I think that, although breaking,
this change is for the better.
ps1
as an alias forpowershell
and the builtinsubcommand does not.
What we get is more uniformity for our users. Most CLI tools using cobra
are likely to use the built-in command to generate shell completion
rather than rolling their own.