summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/rg.122
-rw-r--r--doc/rg.1.md16
2 files changed, 38 insertions, 0 deletions
diff --git a/doc/rg.1 b/doc/rg.1
index d0790955..bf49ec57 100644
--- a/doc/rg.1
+++ b/doc/rg.1
@@ -143,6 +143,28 @@ Show NUM lines before and after each match.
.RS
.RE
.TP
+.B \-\-colors \f[I]SPEC\f[] ...
+This flag specifies color settings for use in the output.
+This flag may be provided multiple times.
+Settings are applied iteratively.
+Colors are limited to one of eight choices: red, blue, green, cyan,
+magenta, yellow, white and black.
+Styles are limited to either nobold or bold.
+.RS
+.PP
+The format of the flag is {type}:{attribute}:{value}.
+{type} should be one of path, line or match.
+{attribute} can be fg, bg or style.
+Value is either a color (for fg and bg) or a text style.
+A special format, {type}:none, will clear all color settings for {type}.
+.PP
+For example, the following command will change the match color to
+magenta and the background color for line numbers to yellow:
+.PP
+rg \-\-colors \[aq]match:fg:magenta\[aq] \-\-colors
+\[aq]line:bg:yellow\[aq] foo.
+.RE
+.TP
.B \-\-column
Show column numbers (1 based) in output.
This only shows the column numbers for the first match on each line.
diff --git a/doc/rg.1.md b/doc/rg.1.md
index 8e6226d7..11487d69 100644
--- a/doc/rg.1.md
+++ b/doc/rg.1.md
@@ -95,6 +95,22 @@ Project home page: https://github.com/BurntSushi/ripgrep
-C, --context *NUM*
: Show NUM lines before and after each match.
+--colors *SPEC* ...
+: This flag specifies color settings for use in the output. This flag may be
+ provided multiple times. Settings are applied iteratively. Colors are limited
+ to one of eight choices: red, blue, green, cyan, magenta, yellow, white and
+ black. Styles are limited to either nobold or bold.
+
+ The format of the flag is {type}:{attribute}:{value}. {type} should be one
+ of path, line or match. {attribute} can be fg, bg or style. Value is either
+ a color (for fg and bg) or a text style. A special format, {type}:none,
+ will clear all color settings for {type}.
+
+ For example, the following command will change the match color to magenta
+ and the background color for line numbers to yellow:
+
+ rg --colors 'match:fg:magenta' --colors 'line:bg:yellow' foo.
+
--column
: Show column numbers (1 based) in output. This only shows the column
numbers for the first match on each line. Note that this doesn't try