summaryrefslogtreecommitdiff
path: root/Documentation/config.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-15 17:39:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-12-15 17:39:53 (GMT)
commit15209c86126a00e8e26ced788019edabf100abaa (patch)
tree11972157c3f9ade90d52465a52f058b7f3367c31 /Documentation/config.txt
parent4e5fd9dbcd10257a4f6b8229c69990a4cd098032 (diff)
parentde658515ae1166577441da09fe7624769e263a3e (diff)
downloadgit-15209c86126a00e8e26ced788019edabf100abaa.zip
git-15209c86126a00e8e26ced788019edabf100abaa.tar.gz
git-15209c86126a00e8e26ced788019edabf100abaa.tar.bz2
Merge branch 're/color-default-reset'
"default" and "reset" colors have been added to our palette. * re/color-default-reset: color: allow colors to be prefixed with "reset" color: support "default" to restore fg/bg color color: add missing GIT_COLOR_* white/black constants
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt23
1 files changed, 18 insertions, 5 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1167e88..b168f02 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -262,11 +262,19 @@ color::
colors (at most two, one for foreground and one for background)
and attributes (as many as you want), separated by spaces.
+
-The basic colors accepted are `normal`, `black`, `red`, `green`, `yellow`,
-`blue`, `magenta`, `cyan` and `white`. The first color given is the
-foreground; the second is the background. All the basic colors except
-`normal` have a bright variant that can be specified by prefixing the
-color with `bright`, like `brightred`.
+The basic colors accepted are `normal`, `black`, `red`, `green`,
+`yellow`, `blue`, `magenta`, `cyan`, `white` and `default`. The first
+color given is the foreground; the second is the background. All the
+basic colors except `normal` and `default` have a bright variant that can
+be specified by prefixing the color with `bright`, like `brightred`.
++
+The color `normal` makes no change to the color. It is the same as an
+empty string, but can be used as the foreground color when specifying a
+background color alone (for example, "normal red").
++
+The color `default` explicitly resets the color to the terminal default,
+for example to specify a cleared background. Although it varies between
+terminals, this is usually not the same as setting to "white black".
+
Colors may also be given as numbers between 0 and 255; these use ANSI
256-color mode (but note that not all terminals may support this). If
@@ -280,6 +288,11 @@ The position of any attributes with respect to the colors
be turned off by prefixing them with `no` or `no-` (e.g., `noreverse`,
`no-ul`, etc).
+
+The pseudo-attribute `reset` resets all colors and attributes before
+applying the specified coloring. For example, `reset green` will result
+in a green foreground and default background without any active
+attributes.
++
An empty color string produces no color effect at all. This can be used
to avoid coloring specific elements without disabling color entirely.
+