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

Rethink displaying arg & subcommand metadata normally and colorfully both #1456

Closed
HarrisonTotty opened this issue Apr 22, 2019 · 2 comments
Closed
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-enhancement Category: Raise on the bar on expectations E-hard Call for participation: Experience needed to fix: Hard / a lot

Comments

@HarrisonTotty
Copy link

Rust Version

  • rustc 1.33.0-nightly (7bac68a5d 2019-01-21)

Affected Version of clap

  • clap 2.33.0

Bug or Feature Request Summary

Currently, when one creates an application with arguments that specify environment variables via .env(), passing a flag that prints the program's help information at runtime will print environment variable information in the form: [env: NAME=], which is all expected.

The issue I wish to bring up arises when you add AppSettings::ColoredHelp (and have the corresponding feature enabled in your Cargo.toml). You'll notice that default values and possible values will be colorized, however the environment variables are not.

Expected Behavior Summary

This is more of a minor nitpick I suppose. I would expect NAME= or NAME in the [env: NAME=] substring to be colorized like how VAL in [default: VAL] is colorized.

@CreepySkeleton CreepySkeleton added C: environment variable C-enhancement Category: Raise on the bar on expectations S-waiting-on-decision Status: Waiting on a go/no-go before implementing labels Feb 1, 2020
@pksunkara pksunkara added this to the 3.1 milestone Feb 6, 2020
@pksunkara
Copy link
Member

I actually removed the colorizing for default values and possible values and aliases in #1824. I wanted to rethink quite a bit on how to display this stuff while also taking #1695 into account. I am renaming this issue.

@pksunkara pksunkara changed the title Enable colored output for env help text Rethink displaying arg & subcommand metadata normally and colorfully both Apr 14, 2020
@pksunkara pksunkara added E-hard Call for participation: Experience needed to fix: Hard / a lot P2: need to have A-help Area: documentation, including docs.rs, readme, examples, etc... and removed S-waiting-on-decision Status: Waiting on a go/no-go before implementing labels Apr 14, 2020
@epage epage removed this from the 3.1 milestone Dec 8, 2021
@epage
Copy link
Member

epage commented Dec 9, 2021

Another case to keep in mind is #1695

With the immediate issue being resolved (consistently there is no styling), I think #2963 supersedes this. If there are thoughts or concerns about closing this out in favor of #2963, let us know!

@epage epage closed this as completed Dec 9, 2021
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 E-hard Call for participation: Experience needed to fix: Hard / a lot
Projects
None yet
Development

No branches or pull requests

4 participants