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

feat(help): Allow styling for inline context #5482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GilShoshan94
Copy link

Allow customizing styling for inline context [default], [possible values], [env], [aliases] and [short aliases]

fix #5093

Hi @epage,

Added the fields inline_context and inline_context_value to Styled.

inline_context_value is an Option<anstyle::Style>, and if not explicitly set, will fallback to inline_context.
The default is simple unstyled as you requested.

I just have one problem with the styling of "Possible Values:" (for enumerated values / multiple choices):
For regular help (-h): It's ok, I styled like the others inline contexts case.
But for the long_help (--help), currently the enumerated values are already styled with the literal style (see here in code)

For now I left it as it is probabling at least a minor release.
It feels a bit incosistent now, and I think I should change the style to inline_context_value.

Let me know if I can add this extra modification.

Styles for [default], [possible values], [env],
[aliases] and [short aliases] as well as their values
@GilShoshan94 GilShoshan94 changed the title Allow customizing styling for inline context feat(help): Allow styling for inline context May 2, 2024
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.

Allow customizing styling of [default], [possible values], [env] in arg description
1 participant