-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow more granular styling #5098
Labels
A-help
Area: documentation, including docs.rs, readme, examples, etc...
C-enhancement
Category: Raise on the bar on expectations
S-waiting-on-design
Status: Waiting on user-facing design to be resolved before implementing
Comments
epage
added
A-help
Area: documentation, including docs.rs, readme, examples, etc...
S-waiting-on-design
Status: Waiting on user-facing design to be resolved before implementing
labels
Aug 28, 2023
This idea was inspired by https://github.com/click-contrib/click-help-colors Unfortunately, not seeing a quick reference, so from what I gather they allow
In addition,. this Issue calls out styling of subcommand names. The challenge here is that we don't want names to be accepted as styled because we do string matching on them. API wise, this might also relate to #1553 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-help
Area: documentation, including docs.rs, readme, examples, etc...
C-enhancement
Category: Raise on the bar on expectations
S-waiting-on-design
Status: Waiting on user-facing design to be resolved before implementing
Please complete the following tasks
Clap Version
4.4.1
Describe your use case
This is a follow-up from #3234 (comment).
There are subcommands, or particular arguments sometimes that would benefit from having particular colouring to express what effect they could have. Imagine the fictional CLI
cluster-manager
which has adelete
subcommand. It would be nice to reflect that this will actually delete a cluster. Perhaps that subcommand will have a prompt to confirm whether the user wants to delete a cluster, to allow for automation the--yes
flag might be added. That--yes
flag might also want to be coloured in a particular way to signify it's a dangerous flag to use.Describe the solution you'd like
The current behaviour is when a subcommand has a style, it overrides the subcommand's. The first change would be to allow the subcommand to change its styling. Then, similarly to how a command's styling works, tune it to allow for overriding a command's style for:
Unless I am missing anything, this should allow any generated line in
--help
to also be uniquely styled:We could style
<args>...
,--something
, anddelete
uniquely.Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: