From f0306405c1b9a24453110f9bfb82123cc8ed2604 Mon Sep 17 00:00:00 2001 From: itchyny Date: Wed, 19 Jul 2023 19:40:58 +0900 Subject: [PATCH] Add notes on `NO_COLOR` environment variable to the manual --- docs/content/manual/manual.yml | 2 ++ jq.1.prebuilt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml index 2af18064..f031c927 100644 --- a/docs/content/manual/manual.yml +++ b/docs/content/manual/manual.yml @@ -168,6 +168,8 @@ sections: By default, jq outputs colored JSON if writing to a terminal. You can force it to produce color even if writing to a pipe or a file using `-C`, and disable color with `-M`. + When the `NO_COLOR` environment variable is not empty, jq disables + colored output by default, but you can enable it by `-C`. Colors can be configured with the `JQ_COLORS` environment variable (see below). diff --git a/jq.1.prebuilt b/jq.1.prebuilt index 3c63997d..bfa4a2b7 100644 --- a/jq.1.prebuilt +++ b/jq.1.prebuilt @@ -112,7 +112,7 @@ Use the given number of spaces (no more than 7) for indentation\. \fB\-\-color\-output\fR / \fB\-C\fR and \fB\-\-monochrome\-output\fR / \fB\-M\fR: . .IP -By default, jq outputs colored JSON if writing to a terminal\. You can force it to produce color even if writing to a pipe or a file using \fB\-C\fR, and disable color with \fB\-M\fR\. +By default, jq outputs colored JSON if writing to a terminal\. You can force it to produce color even if writing to a pipe or a file using \fB\-C\fR, and disable color with \fB\-M\fR\. When the \fBNO_COLOR\fR environment variable is not empty, jq disables colored output by default, but you can enable it by \fB\-C\fR\. . .IP Colors can be configured with the \fBJQ_COLORS\fR environment variable (see below)\.