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

fix(completions): Complete map flags multiple times #2174

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

gabe565
Copy link
Contributor

@gabe565 gabe565 commented Jul 27, 2024

Cobra currently allows Slice and Array flags to be completed multiple times, but it doesn't support multiple map flags like stringToString and stringToInt in the same way.

This PR adds support for map flags to be set multiple times.

@CLAassistant
Copy link

CLAassistant commented Jul 27, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@marckhouzam marckhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I was not aware of these types.

completions.go Outdated Show resolved Hide resolved
@gabe565 gabe565 force-pushed the map-flag-complete-multiple branch 2 times, most recently from 1352900 to 8f82817 Compare July 28, 2024 05:37
@gabe565 gabe565 force-pushed the map-flag-complete-multiple branch from 8f82817 to 411a8af Compare July 28, 2024 05:52
Copy link
Collaborator

@marckhouzam marckhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@marckhouzam marckhouzam merged commit 756ba6d into spf13:main Jul 28, 2024
18 checks passed
@marckhouzam marckhouzam added this to the 1.9.0 milestone Jul 28, 2024
@marckhouzam marckhouzam added the area/shell-completion All shell completions label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/shell-completion All shell completions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants