diff --git a/README.md b/README.md index 74ba9ad3..de82c8f0 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,9 @@ or JC_COLORS=default,default,default,default ``` +### Disable Colors via Environment Variable +You can set the [`NO_COLOR`](http://no-color.org/) environment variable to any value to disable color output in `jc`. Note that using the `-C` option to force color output will override both the `NO_COLOR` environment variable and the `-m` option. + ### Streaming Parsers Most parsers load all of the data from STDIN, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. `ls-s` and `ping-s`) that immediately start processing and outputing the data line-by-line as [JSON Lines](https://jsonlines.org/) (aka [NDJSON](http://ndjson.org/)) while it is being received from STDIN. This can significantly reduce the amount of memory required to parse large amounts of command output (e.g. `ls -lR /`) and can sometimes process the data more quickly. Streaming parsers have slightly different behavior than standard parsers as outlined below. diff --git a/man/jc.1 b/man/jc.1 index 812da859..cf2b1ddd 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -491,6 +491,9 @@ ifconfig exit code = \fB1\fP, jc exit code = \fB100\fP, combined exit code = \fB .RE .SH ENVIRONMENT + +\fBCustom Colors\fP + You can specify custom colors via the \fBJC_COLORS\fP environment variable. The \fBJC_COLORS\fP environment variable takes four comma separated string values in the following format: JC_COLORS=,,, @@ -507,6 +510,9 @@ or JC_COLORS=default,default,default,default .RE +\fBDisable Color Output\fP + +You can set the `NO_COLOR` environment variable to any value to disable color output in \fBjc\fP. Note that using the \fB-C\fP option to force color output will override both the \fBNO_COLOR\fP environment variable and the \fB-m\fP option. .SH STREAMING PARSERS Most parsers load all of the data from \fBSTDIN\fP, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. \fBls-s\fP and \fBping-s\fP) that immediately start processing and outputing the data line-by-line as JSON Lines (aka NDJSON) while it is being received from \fBSTDIN\fP. This can significantly reduce the amount of memory required to parse large amounts of command output (e.g. \fBls -lR /\fP) and can sometimes process the data more quickly. Streaming parsers have slightly different behavior than standard parsers as outlined below. diff --git a/templates/manpage_template b/templates/manpage_template index a35c93d0..8748671e 100644 --- a/templates/manpage_template +++ b/templates/manpage_template @@ -86,6 +86,9 @@ ifconfig exit code = \fB1\fP, jc exit code = \fB100\fP, combined exit code = \fB .RE .SH ENVIRONMENT + +\fBCustom Colors\fP + You can specify custom colors via the \fBJC_COLORS\fP environment variable. The \fBJC_COLORS\fP environment variable takes four comma separated string values in the following format: JC_COLORS=,,, @@ -102,6 +105,9 @@ or JC_COLORS=default,default,default,default .RE +\fBDisable Color Output\fP + +You can set the `NO_COLOR` environment variable to any value to disable color output in \fBjc\fP. Note that using the \fB-C\fP option to force color output will override both the \fBNO_COLOR\fP environment variable and the \fB-m\fP option. .SH STREAMING PARSERS Most parsers load all of the data from \fBSTDIN\fP, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. \fBls-s\fP and \fBping-s\fP) that immediately start processing and outputing the data line-by-line as JSON Lines (aka NDJSON) while it is being received from \fBSTDIN\fP. This can significantly reduce the amount of memory required to parse large amounts of command output (e.g. \fBls -lR /\fP) and can sometimes process the data more quickly. Streaming parsers have slightly different behavior than standard parsers as outlined below. diff --git a/templates/readme_template b/templates/readme_template index c2c151f2..f4b38b68 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -149,6 +149,9 @@ or JC_COLORS=default,default,default,default ``` +### Disable Colors via Environment Variable +You can set the [`NO_COLOR`](http://no-color.org/) environment variable to any value to disable color output in `jc`. Note that using the `-C` option to force color output will override both the `NO_COLOR` environment variable and the `-m` option. + ### Streaming Parsers Most parsers load all of the data from STDIN, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. `ls-s` and `ping-s`) that immediately start processing and outputing the data line-by-line as [JSON Lines](https://jsonlines.org/) (aka [NDJSON](http://ndjson.org/)) while it is being received from STDIN. This can significantly reduce the amount of memory required to parse large amounts of command output (e.g. `ls -lR /`) and can sometimes process the data more quickly. Streaming parsers have slightly different behavior than standard parsers as outlined below.