Skip to content
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

completion prints the "documentation" of the subcommand and is injected on validation #10438

Closed
metal3d opened this issue Dec 6, 2021 · 3 comments
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@metal3d
Copy link

metal3d commented Dec 6, 2021

Output of helm version:

version.BuildInfo{Version:"v3.7.1", GitCommit:"1d11fcb5d3f3bf00dbe6fe31b8412839a96b3dc4", GitTreeState:"clean", GoVersion:"go1.16.9"}

Using "bash" completion (in bash session of course), when I press TAB, the subcommand are well displayed but the help of the subcommand is also printed. Validating the completion prints the subcommand + help.

Exemple:

$ source <(helm completion bash)
$ helm s[TAB] 
# then I go to "search" and it injects the below line in the terminal:
helm search\ \ \(search\ for\ a\ keyword\ in\ charts\) 

helm

@marckhouzam
Copy link
Member

Hi @metal3d. This is because you probably use the bash menu-complete option. It is a bug for which a fix is ready: spf13/cobra#1509

Until then what you can do is turn off descriptions for completions:
source <(helm completion bash --no-descriptions)

@mattfarina mattfarina added the bug Categorizes issue or PR as related to a bug. label Dec 7, 2021
@metal3d
Copy link
Author

metal3d commented Dec 12, 2021

wooo thank you !

@metal3d
Copy link
Author

metal3d commented May 3, 2023

Hello, even with helm version.BuildInfo{Version:"v3.7.2", GitCommit:"663a896f4a815053445eec4153677ddc24a0a361", GitTreeState:"clean", GoVersion:"go1.16.10"} the description is buggy :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants