Skip to content

Commit 8223903

Browse files
authored
Support $NO_COLOR (#1580)
* Support `$NO_COLOR` * run `make dev`
1 parent 66abef6 commit 8223903

11 files changed

+23
-22
lines changed

docs/src/manpage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,8 @@ This is simply a copy of what you should see on running `man mlr` at a command p
648648
How you can control colorization:
649649

650650
* Suppression/unsuppression:
651-
* Environment variable `export MLR_NO_COLOR=true` means don't color
652-
even if stdout+TTY.
651+
* Environment variable `export MLR_NO_COLOR=true` or `export NO_COLOR=true`
652+
means don't color even if stdout+TTY.
653653
* Environment variable `export MLR_ALWAYS_COLOR=true` means do color
654654
even if not stdout+TTY.
655655
For example, you might want to use this when piping mlr output to `less -r`.
@@ -3730,5 +3730,5 @@ This is simply a copy of what you should see on running `man mlr` at a command p
37303730
MIME Type for Comma-Separated Values (CSV) Files, the Miller docsite
37313731
https://miller.readthedocs.io
37323732

3733-
2024-05-11 4mMILLER24m(1)
3733+
2024-06-08 4mMILLER24m(1)
37343734
</pre>

docs/src/manpage.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@
627627
How you can control colorization:
628628

629629
* Suppression/unsuppression:
630-
* Environment variable `export MLR_NO_COLOR=true` means don't color
631-
even if stdout+TTY.
630+
* Environment variable `export MLR_NO_COLOR=true` or `export NO_COLOR=true`
631+
means don't color even if stdout+TTY.
632632
* Environment variable `export MLR_ALWAYS_COLOR=true` means do color
633633
even if not stdout+TTY.
634634
For example, you might want to use this when piping mlr output to `less -r`.
@@ -3709,4 +3709,4 @@
37093709
MIME Type for Comma-Separated Values (CSV) Files, the Miller docsite
37103710
https://miller.readthedocs.io
37113711

3712-
2024-05-11 4mMILLER24m(1)
3712+
2024-06-08 4mMILLER24m(1)

docs/src/output-colorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ described below:
5050

5151
* Suppression/unsuppression:
5252

53-
* `export MLR_NO_COLOR=true` means Miller won't color even when it normally would.
53+
* `export MLR_NO_COLOR=true` or `export NO_COLOR=true` means Miller won't color even when it normally would.
5454
* `export MLR_ALWAYS_COLOR=true` means Miller will color even when it normally would not. For example, you might want to use this when piping `mlr` output to `less -r`.
5555
* Command-line flags `--no-color` or `-M`, `--always-color` or `-C`.
5656
* On Windows, replace `export` with `set`

docs/src/output-colorization.md.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ described below:
3434

3535
* Suppression/unsuppression:
3636

37-
* `export MLR_NO_COLOR=true` means Miller won't color even when it normally would.
37+
* `export MLR_NO_COLOR=true` or `export NO_COLOR=true` means Miller won't color even when it normally would.
3838
* `export MLR_ALWAYS_COLOR=true` means Miller will color even when it normally would not. For example, you might want to use this when piping `mlr` output to `less -r`.
3939
* Command-line flags `--no-color` or `-M`, `--always-color` or `-C`.
4040
* On Windows, replace `export` with `set`

docs/src/reference-main-env-vars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ Quick links:
1919
The following environment variables affect how Miller works:
2020

2121
* `MLRRC`: see [Customization](customization.md).
22-
* `MLR_NO_COLOR`, `MLR_ALWAYS_COLOR`, `MLR_KEY_COLOR`, `MLR_VALUE_COLOR`, `MLR_PASS_COLOR`, `MLR_FAIL_COLOR`, `MLR_REPL_PS1_COLOR`, `MLR_REPL_PS2_COLOR`, `MLR_HELP_COLOR`: see [Output Colorization](output-colorization.md).
22+
* `MLR_NO_COLOR`, `NO_COLOR`, `MLR_ALWAYS_COLOR`, `MLR_KEY_COLOR`, `MLR_VALUE_COLOR`, `MLR_PASS_COLOR`, `MLR_FAIL_COLOR`, `MLR_REPL_PS1_COLOR`, `MLR_REPL_PS2_COLOR`, `MLR_HELP_COLOR`: see [Output Colorization](output-colorization.md).
2323
* `MLR_REPL_PS1`, `MLR_REPL_PS2`: see [REPL](repl.md).
2424

docs/src/reference-main-env-vars.md.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
The following environment variables affect how Miller works:
44

55
* `MLRRC`: see [Customization](customization.md).
6-
* `MLR_NO_COLOR`, `MLR_ALWAYS_COLOR`, `MLR_KEY_COLOR`, `MLR_VALUE_COLOR`, `MLR_PASS_COLOR`, `MLR_FAIL_COLOR`, `MLR_REPL_PS1_COLOR`, `MLR_REPL_PS2_COLOR`, `MLR_HELP_COLOR`: see [Output Colorization](output-colorization.md).
6+
* `MLR_NO_COLOR`, `NO_COLOR`, `MLR_ALWAYS_COLOR`, `MLR_KEY_COLOR`, `MLR_VALUE_COLOR`, `MLR_PASS_COLOR`, `MLR_FAIL_COLOR`, `MLR_REPL_PS1_COLOR`, `MLR_REPL_PS2_COLOR`, `MLR_HELP_COLOR`: see [Output Colorization](output-colorization.md).
77
* `MLR_REPL_PS1`, `MLR_REPL_PS2`: see [REPL](repl.md).
88

docs/src/reference-main-flag-list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ Mechanisms for coloring:
328328
How you can control colorization:
329329

330330
* Suppression/unsuppression:
331-
* Environment variable `export MLR_NO_COLOR=true` means don't color
332-
even if stdout+TTY.
331+
* Environment variable `export MLR_NO_COLOR=true` or `export NO_COLOR=true`
332+
means don't color even if stdout+TTY.
333333
* Environment variable `export MLR_ALWAYS_COLOR=true` means do color
334334
even if not stdout+TTY.
335335
For example, you might want to use this when piping mlr output to `less -r`.

man/manpage.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@
627627
How you can control colorization:
628628

629629
* Suppression/unsuppression:
630-
* Environment variable `export MLR_NO_COLOR=true` means don't color
631-
even if stdout+TTY.
630+
* Environment variable `export MLR_NO_COLOR=true` or `export NO_COLOR=true`
631+
means don't color even if stdout+TTY.
632632
* Environment variable `export MLR_ALWAYS_COLOR=true` means do color
633633
even if not stdout+TTY.
634634
For example, you might want to use this when piping mlr output to `less -r`.
@@ -3709,4 +3709,4 @@
37093709
MIME Type for Comma-Separated Values (CSV) Files, the Miller docsite
37103710
https://miller.readthedocs.io
37113711

3712-
2024-05-11 4mMILLER24m(1)
3712+
2024-06-08 4mMILLER24m(1)

man/mlr.1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: mlr
33
.\" Author: [see the "AUTHOR" section]
44
.\" Generator: ./mkman.rb
5-
.\" Date: 2024-05-11
5+
.\" Date: 2024-06-08
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "MILLER" "1" "2024-05-11" "\ \&" "\ \&"
10+
.TH "MILLER" "1" "2024-06-08" "\ \&" "\ \&"
1111
.\" -----------------------------------------------------------------
1212
.\" * Portability definitions
1313
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -756,8 +756,8 @@ Mechanisms for coloring:
756756
How you can control colorization:
757757

758758
* Suppression/unsuppression:
759-
* Environment variable `export MLR_NO_COLOR=true` means don't color
760-
even if stdout+TTY.
759+
* Environment variable `export MLR_NO_COLOR=true` or `export NO_COLOR=true`
760+
means don't color even if stdout+TTY.
761761
* Environment variable `export MLR_ALWAYS_COLOR=true` means do color
762762
even if not stdout+TTY.
763763
For example, you might want to use this when piping mlr output to `less -r`.

pkg/cli/option_parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,8 +2715,8 @@ Mechanisms for coloring:
27152715
How you can control colorization:
27162716
27172717
* Suppression/unsuppression:
2718-
* Environment variable ` + "`export MLR_NO_COLOR=true`" + ` means don't color
2719-
even if stdout+TTY.
2718+
* Environment variable ` + "`export MLR_NO_COLOR=true` or `export NO_COLOR=true`" + `
2719+
means don't color even if stdout+TTY.
27202720
* Environment variable ` + "`export MLR_ALWAYS_COLOR=true`" + ` means do color
27212721
even if not stdout+TTY.
27222722
For example, you might want to use this when piping mlr output to ` + "`less -r`" + `.

0 commit comments

Comments
 (0)