summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorNico Williams <nico@cryptonector.com>2017-04-29 13:00:52 -0500
committerWilliam Langford <wlangfor@gmail.com>2017-04-29 14:00:52 -0400
commit6d89e297febdbcbad4ecf201e56fc8ec99f67137 (patch)
treecc70c53bf330c65c8cabe10152c89ce9805c5e12 /docs
parent32d8f2000a80c3702b04f3423180ebfeaa503eb7 (diff)
Add JQ_COLORS env var for color config (fix #1252)
Diffstat (limited to 'docs')
-rw-r--r--docs/content/3.manual/manual.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml
index f666ceb1..fcca8412 100644
--- a/docs/content/3.manual/manual.yml
+++ b/docs/content/3.manual/manual.yml
@@ -160,6 +160,9 @@ sections:
terminal. You can force it to produce color even if writing to
a pipe or a file using `-C`, and disable color with `-M`.
+ Colors can be configured with the `JQ_COLORS` environment
+ variable (see below).
+
* `--ascii-output` / `-a`:
jq usually outputs non-ASCII Unicode codepoints as UTF-8, even
@@ -3195,3 +3198,42 @@ sections:
could then use to, for example, search for, download, and
install missing dependencies.
+ - title: Colors
+ body: |
+
+ To configure alternative colors just set the `JQ_COLORS`
+ environment variable to colon-delimited list of partial terminal
+ escape sequences like `"1;31"`, in this order:
+
+ - color for `null`
+ - color for `false`
+ - color for `true`
+ - color for numbers
+ - color for strings
+ - color for arrays
+ - color for objects
+
+ The default color scheme is the same as setting
+ `"JQ_COLORS=1;30:0;39:0;39:0;39:0;32:1;39:1;39"`.
+
+ This is not a manual for VT100/ANSI escapes. However, each of
+ these color specifications should consist of two numbers separated
+ by a semi-colon, where the first number is one of these:
+
+ - 1 (bright)
+ - 2 (dim)
+ - 4 (underscore)
+ - 5 (blink)
+ - 7 (reverse)
+ - 8 (hidden)
+
+ and the second is one of these:
+
+ - 30 (black)
+ - 31 (red)
+ - 32 (green)
+ - 33 (yellow)
+ - 34 (blue)
+ - 35 (magenta)
+ - 36 (cyan)
+ - 37 (white)