-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
[bug] zsh shell completion throw error #296
Comments
@gpstuff thx for you feedback |
This is a bug in the cobra completions, not in kubecm. I created a ticket and a PR.. |
The problem is probably that Line 53 in ba2a539
The SetOutput() function sets stderr and stdout to point to the same place. That function is deprecated in favor of the two functions SetOut() and SetErr() as you can see here: https://github.com/spf13/cobra/blob/master/command.go#L250-L268
If you really want to have stderr print to stdout, then you need to change it just for the You can see some documentation about this here: https://github.com/spf13/cobra/blob/master/shell_completions.md#debugging Making this difference between stderr and stdout for shell completion allows to print debugging information to stderr without breaking the completion scripts. |
@marckhouzam @burmanm Thx for your feedback, this should be a historical problem and I will try to fix this issue. |
Hi, i noticed this issue is only for fish and powershell but I have some problems with completion also on zsh.
For example on tab after
kubecm
I get that last option:It also happen with any other commands but the error is sometime different:
I enabled the completion with
kubecm completion zsh > "${fpath[1]}/_kubecm"
and zsh version iszsh 5.8 (x86_64-ubuntu-linux-gnu)
, don't know if it matters but I also use oh-my-zsh.Originally posted by @gpstuff in #76 (comment)
The text was updated successfully, but these errors were encountered: