You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add colored CLI help formatting and respect NO_COLOR (#109)
* Add a colored help formatter
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
* Respect NO_COLOR environment variable for logged output too
* Fix stubtest & typing errors
* Remove unused noqa comment
Copy file name to clipboardExpand all lines: docs/command_line.md
+48-32Lines changed: 48 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,9 @@
3
3
The reference for docstub's command line interface.
4
4
It uses [Click](https://click.palletsprojects.com/en/stable/), so [shell completion](https://click.palletsprojects.com/en/stable/shell-completion/) can be enabled.
5
5
6
+
Colored command line output can be disabled by [setting the environment variable `NO_COLOR=1`](https://no-color.org).
7
+
8
+
6
9
## `docstub`
7
10
8
11
<!--- The following block is checked by the test suite --->
0 commit comments