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
RegisterFlagCompletionFunc writes what looks like debug info to screen #1287
Comments
Do you use fish? This sound like a dup of #1279 |
Thanks for the hint! |
I reviewed my code but there is no newline written. |
Thanks for checking. I looked at the code and we use Lines 156 to 163 in 08c51e5
@marckhouzam Should this be hard coded to stdout and stderr? |
Interesting.
But it does bring up the issue that someone may want to have @Luap99 Forcing the completion "debug" printouts to stderr would reduce testing options, I believe. For example. Helm has go tests which check that the "ShellDirectiveNoFileComp" string is part of the output of the Also, allowing to redirect "debug" output does give more testing options (like adding extra debug printouts to Line 536 in 08c51e5
Still, maybe we should only change the stream for the "debug" output if we see the stream is the same for out and err? Or we could just not print that line in that particular case. What do you think? |
If you think that this is required for testing options we should keep it. |
This issue is being marked as stale due to a long period of inactivity |
We need to fix this so let's keep it open. |
Hi,
Great product you are making!
I have been using Cobra for a few years now and I wanted to try the flagcompletion.
I put this into a command for testing:
When running the command and providing the flag and [tab][tab], I get:
I am using Cobra version 1.1.1.
Is there anything I am doing wrong here or how can I prevent the ':0 Completion directive ended' be printed on screen?
The text was updated successfully, but these errors were encountered: