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

DisableColoredHelp and less decorated formatting in general from a user side #3780

Closed
2 tasks done
pacak opened this issue Jun 2, 2022 · 2 comments
Closed
2 tasks done
Labels
C-enhancement Category: Raise on the bar on expectations

Comments

@pacak
Copy link

pacak commented Jun 2, 2022

Please complete the following tasks

Clap Version

not using one myself

Describe your use case

Some of the existing tools use clap to parse command line options, at some point clap started using fancier formatting: colors and extra empty lines between commands. Colors used by clap look ugly in my terminal color scheme and extra empty lines make it so options that would otherwise fit on a single line easily take 2-3 pages making it harder to use.

Describe the solution you'd like

An environment variable that I can set globally in order to achieve DisableColoredHelp-like effects. And ideally a formatting like this, but without colors. #2906 (comment)

Bad since it uses 1/5 of the horizontal space which I have plenty and 3x as much vertical space as needed and this causes whole help to take up several pages making it annoying to write a command

        --locked
            Require Cargo.lock is up to date

        --offline
            Run without accessing the network

Good, uses 3x less vertical space, uses about as much horizontal space as the previous setup, still well within 80 columns

        --locked       Require Cargo.lock is up to date
        --offline      Run without accessing the network

Alternatives, if applicable

NO_COLOR environment variable, setting it globally is not an option since I do want to keep it enabled.

Additional Context

I'm using a slightly modified color scheme and a slightly larger than usual font size.

@pacak pacak added the C-enhancement Category: Raise on the bar on expectations label Jun 2, 2022
@epage
Copy link
Member

epage commented Jun 2, 2022

Colored help was discussed a lot in #2906. That links to several issues for improving it.

More context is needed to know why the help is overflowing to the next line. The intention is to give more room for when it overflows the line.

We offer control over both for application authors. I'd also recommend reaching out to them if you have concerns over how their applications are configured.

This issue is also actually two issues.

I'm going to go ahead and close this. If you want to open an issue about this in the future, please remember to

  • Be specific and only include one topic per issue
  • Please provide more context (application, full output, how its configured clap, etc)
  • Please provide more constructive feedback than something being "ugly". Why is it ugly? Is there a way to make it not ugly? etc

@epage epage closed this as completed Jun 2, 2022
@pacak
Copy link
Author

pacak commented Jun 2, 2022

This issue is also actually two issues.

Hmm... Both are cosmetic things, both related to something mostly end user must deal with and don't have any control of. But if I must pick - colors are more important to fix.

Colored help was discussed a lot in #2906.

I saw it, went though everything: I even linked one of the comments myself, it doesn't offer any solutions to a problem I'm having. There are links but none of them talks from the end user point of view.

We offer control over both for application authors. I'd also recommend reaching out to them if you have concerns over how their applications are configured.

That's not really an option. In an extreme case I'm using them all and convincing everyone to get rid of the colors. Even if I succeed (which I won't) - this renders whole coloring machinery in clap useless. Some apps could be already dead with maintainers nowhere to be seen. There are some more realistic solutions including making private or public app fork (see ormolu/fourmolu in Haskell over ability to configure some things) or doing some shell script magic that would nuke the colors for the apps I do care about.

I just wanted to share a point of view of someone who actually needs to read the help to understand how to use something. Authors tend to know how the thing works and use it at most as a reference.

Please provide more constructive feedback than something being "ugly". Why is it ugly? Is there a way to make it not ugly? etc

With my monitor/colorscheme/glasses/color perception I need to strain my eyes to read the green part of a screenshot I linked. I can add more screenshots but without glasses/eyes/color perception it won't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

2 participants