Skip to content

Conversation

@lagru
Copy link
Member

@lagru lagru commented Nov 1, 2025

Release note

For maintainers and optionally contributors, please refer to changelist's README on how to document this PR for the release notes.

Highlight help messages (invoked with `-h` or `--help`) of the command line interface
with colors and reformat. This should improve the readability.
Don't color output if the environment variable `NO_COLOR=1` is set.
Add the short command line option `-g` as an alternative to `docstub run --group-errors`.

lagru added 2 commits November 1, 2025 00:56
Compared to click's default formatter, this highlights options, usuage,
headings and formats option lists in a linear style (descriptions of
options are on a new line). Options are also aligned so that single-dash
options like "-v" stand-out more.

This will also respect the NO_COLOR envirornment variable now.

Also adds a short "-g" option for "--group-errors".

This is loosely inspired by spin [1].

[1] https://github.com/scientific-python/spin/blob/edbd6572f7fc53fa0914fe6337b1bb2599e457fa/spin/color_format.py
@lagru lagru added this to the v0.6 milestone Nov 1, 2025
@lagru lagru added the enhancement New feature or functionality label Nov 1, 2025
@lagru lagru merged commit 00a52a1 into main Nov 1, 2025
8 checks passed
@lagru lagru deleted the colored-cli-help branch November 1, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants