completion: add wrapper code to transform bash to zsh completion#1685
Merged
balopat merged 2 commits intoGoogleContainerTools:masterfrom Feb 25, 2019
Merged
Conversation
Cobra zsh completion is pretty broken. The idea is therefore, to use the working bash completion from cobra and wrap that with zsh adapter code. This code is based on the kubectl wrapper script. Fixes GoogleContainerTools#1671 Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Codecov Report
@@ Coverage Diff @@
## master #1685 +/- ##
==========================================
- Coverage 46.69% 46.48% -0.21%
==========================================
Files 123 123
Lines 5600 5625 +25
==========================================
Hits 2615 2615
- Misses 2716 2741 +25
Partials 269 269
Continue to review full report at Codecov.
|
Contributor
|
Thank you for fixing this!!!
I think it's fine just as a reference to put a comment "inspired by kubectl completion script" and a link |
Contributor
|
On second thought - reading the Apache license maybe actually adding their copyright notice as attribution is not a bad idea. So in the end we would have
|
Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Contributor
Author
|
@balopat Ok, I added the attribution to kubernetes. Is the go package path ok as a link? |
balopat
approved these changes
Feb 25, 2019
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.
Cobra zsh completion is pretty broken. The idea is therefore, to use the working bash completion from cobra and wrap that with zsh adapter code. This code is based on the kubectl wrapper script.
I'm a bit unsure about the proper copyright notice. I left it as-is, but the beef of the logic comes from https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/completion/completion.go . Must I therefore include a proper attribution for the wrapper script?
Fixes #1671