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

Highlighting of options, choices and metavars #17

Open
kdeldycke opened this issue Oct 14, 2021 · 1 comment
Open

Highlighting of options, choices and metavars #17

kdeldycke opened this issue Oct 14, 2021 · 1 comment

Comments

@kdeldycke
Copy link

I developed some code in my mail-deduplicate CLI some month ago to automatically highlights all options, choices and metavars in help screens generated by click. See how it renders:

cli-colored-help

For reference, here is my current implementation, which is mainly based on regular expressions.

To me it is a good enough compromise, because help screen are not consumed by machine but are designed for human. Is this workaround good enough to be adapted to click-help-colors or serve as inspiration?

For the record, this has initially been discussed for Cloup at janluke/cloup#95, and is considered under janluke/cloup#97.

@kdeldycke
Copy link
Author

All the code to improve help screen coloring as in the screenshot above has been made available as a stand-alone package: click-extra.

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

No branches or pull requests

1 participant