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

Improve colorchoice enum #4978

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Improve colorchoice enum #4978

merged 1 commit into from
Jun 20, 2023

Conversation

pksunkara
Copy link
Member

@pksunkara pksunkara commented Jun 20, 2023

This is done because of the decisions made in discussion for colorchoice_clap crate, see rust-cli/anstyle#102.

ColorChoice::possible_values is a convenience for builder users.

As for ValueEnum::to_possible_value, it was originally written this way to mimic ripgrep's --help output. However, this forces short/long help distinction when there might not be otherwise. Looking at other programs, like git, there doesn't seem to be a longer description of the values (an "always ansi" makes things more complicated).

@pksunkara pksunkara requested a review from epage June 20, 2023 07:56
@epage
Copy link
Member

epage commented Jun 20, 2023

Thanks!

@epage epage merged commit 4aff61d into master Jun 20, 2023
@epage epage deleted the colorchoice-values branch June 20, 2023 16:13
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

Successfully merging this pull request may close these issues.

2 participants