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

Question: how to hide the description in the completion #1894

Closed
Shihta opened this issue Jan 13, 2023 · 5 comments
Closed

Question: how to hide the description in the completion #1894

Shihta opened this issue Jan 13, 2023 · 5 comments

Comments

@Shihta
Copy link
Contributor

Shihta commented Jan 13, 2023

As the red frame part:

截圖 2023-01-13 下午11 46 37

how to hide the description?

Thanks!

@marckhouzam
Copy link
Collaborator

Is ccli a tool you installed or a tool you wrote yourself?

@Shihta
Copy link
Contributor Author

Shihta commented Jan 14, 2023

Is ccli a tool you installed or a tool you wrote yourself?

I wrote myself, used the latest cobra (v1.6.1)

@marckhouzam
Copy link
Collaborator

Each call to Gen*Completion() for the different shells has a way to disable descriptions. Those APIs use an argument for Bash completion v2 and fish, while zsh has GenZshCompletionNoDesc(). PowerShell uses GenPowerShellCompletion() for completions without descriptions (compared to GenPowerShellCompletionWithDesc())

@Shihta
Copy link
Contributor Author

Shihta commented Jan 14, 2023

thanks for the tip, I finally realized that there was a ready-made flag to use:

截圖 2023-01-14 下午11 22 09

This doesn't seem to be in the document, I think it's worth mentioning

@marckhouzam
Copy link
Collaborator

Good point. Interested in posting a PR @Shihta ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants