Skip to content

ZSH completion load: can only be called from completion function #1671

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

Closed
soullivaneuh opened this issue Feb 18, 2019 · 2 comments
Closed

ZSH completion load: can only be called from completion function #1671

soullivaneuh opened this issue Feb 18, 2019 · 2 comments
Labels
area/cli kind/bug Something isn't working

Comments

@soullivaneuh
Copy link

Expected behavior

ZSH completion loading.

Actual behavior

~ at ☸️  microk8s 
➜ source <(skaffold completion zsh)
_arguments:comparguments:325: can only be called from completion function
_arguments:comparguments:325: can only be called from completion function

Information

  • Skaffold version: v0.23.0
  • Operating system: Linux sweethome 4.18.0-15-generic [UX] Add command completion #16-Ubuntu SMP Thu Feb 7 10:56:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Contents of skaffold.yaml: Not related.

Steps to reproduce the behavior

  1. source <(skaffold completion zsh)
@corneliusweig
Copy link
Contributor

I guess that's my fault. I didn't realize that zsh completion was utterly broken in cobra, when I enabled it. Would a static zsh completion file be fine for the time being? There is an open PR in cobra which will fix this, but it's been quiet for some time now :(

corneliusweig pushed a commit to corneliusweig/skaffold that referenced this issue Feb 22, 2019
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 <[email protected]>
@balopat balopat added area/cli kind/bug Something isn't working labels Feb 22, 2019
balopat pushed a commit that referenced this issue Feb 25, 2019
* completion: add wrapper code to transform bash to zsh completion

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 #1671

Signed-off-by: Cornelius Weig <[email protected]>

* Add proper attribution for the wrapper code to the kubernetes authors

Signed-off-by: Cornelius Weig <[email protected]>
@soullivaneuh
Copy link
Author

@corneliusweig Sorry for the respond time and thanks for the fix! As it works, it's already a good news! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants