-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Clap v3 ColoredHelp by default #2055
Comments
Nope. Color Help should be opt-in since features are additive. |
@pksunkara Features are additive but it defaults to "colors" being enabled. I think colored help should be enabled if the feature is enabled and disabled if feature is disabled. Enabling the feature "colors" but not enabling colored help is not helping feature discover-ability. IIRC @CreepySkeleton commented on this, I think he agrees or maybe I got the wrong idea. #1976 (comment) |
Let me rephrase. CLIs by default are not colored. And then the user should specifically given an option to color it. Lots of people don't like colors. Making it opt-in is a good compromise. |
Guys, I think you've all been missing the main point of my comment: the coloring is already gated behind
I don't think we need it at all. Except, the colors are |
No it is not. There are 3 controls for colored help message.
By mix-matching these the user (cli developer here) can customise what they want. |
Reenergizing the topic!
Sure. But I don't see where The possible scenarios:
Let's imagine we don't have
And what is the current situation?
Important note: I think the second system is kinda fucked up (probably because of legacy; you've just got used to taking it for normal) and the first is much better. @pksunkara Counter arguments? |
This comment has been minimized.
This comment has been minimized.
You are missing the scenario where the users wants colors for error messages but no colors for help message. This is why we have 3 controls. |
Does... anybody do that, really? I mean, intentionally, not because they forgot to enable |
This is actually the reason why I'm so insistent on this issue:
The current system is too easy to misuse. |
Yes, I do this in one the CLI tools I develop and use, https://github.com/termapps/enquirer. Regarding making |
I have an idea for a middle ground between normal users and more advanced users.
Going even further, I think it may be better to have Different scenarios and steps required which improves the current process for people wanting colors (3 steps)
To ease understanding on these, we could mention that |
It already works like that. And damn, you just converted 3 control flags which can be used together into 9 flags which are exclusive. That's not a good user experience. Let's not go into a tangent and focus on the discussion here. I think what @CreepySkeleton is proposing is that we convert |
No, it is not exclusive. The reason I split into 3 different settings is that Essentially two paths are checked
However, internally we could represent them using only 2 states, two |
Make sure you completed the following tasks
Describe your use case
Use
ColoredHelp
forAppSettings
by default ifcolor
feature is present, optionally available for opt-out. Quite a few crates is not aware of this feature and was surprised that there is colored help setting, this would prove useful for those enabledcolor
feature which is being enabled by default.Describe the solution you'd like
Change
ColoredHelp
toNoColoredHelp
for opt-out, by default colored help is enabled.Alternatives, if applicable
Not in my mind.
Additional context
I made a few pull requests to other applications using clap, they were all surprised that there is a feature to have colored help. Only ripgrep that I know explicitly opt out for colored help since they use another crate for coloring and does not want to pull in an additional dependency, not sure if that's true in clap v3.
The text was updated successfully, but these errors were encountered: