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

Add cobra flag completion suggestions #10

Open
avirtopeanu-ionos opened this issue Apr 18, 2023 · 1 comment
Open

Add cobra flag completion suggestions #10

avirtopeanu-ionos opened this issue Apr 18, 2023 · 1 comment

Comments

@avirtopeanu-ionos
Copy link

avirtopeanu-ionos commented Apr 18, 2023

Hi! There is currently no support for flag value completions.

To achieve this, We need to access the flagCompletionFunctions map in the cobra package and retrieve the flag completion functions for a given command. I have opened an issue (spf13/cobra#1942) and submitted a PR (spf13/cobra#1943) in the cobra repository to add getters for the flagCompletionFunctions map.

I would appreciate your feedback on this feature and any suggestions you may have. Please feel free to check the linked issue and PR in the cobra repository for more context.

Thank you!

@avirtopeanu-ionos
Copy link
Author

avirtopeanu-ionos commented Sep 29, 2023

Update: spf13/cobra#1943 has been merged! Cobra-prompt can now implement handle flag-value completions!

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

1 participant