doc: clarify syntax for %C(auto,...) in pretty formats
The manual correctly describes the syntax with `auto,` but the trailing `,` is hard to spot in a terminal. The HTML format does not have this problem. Adding an example helps both worlds. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
95d6787973
commit
8592c95cdf
@ -174,11 +174,12 @@ endif::git-rev-list[]
|
|||||||
- '%Creset': reset color
|
- '%Creset': reset color
|
||||||
- '%C(...)': color specification, as described under Values in the
|
- '%C(...)': color specification, as described under Values in the
|
||||||
"CONFIGURATION FILE" section of linkgit:git-config[1];
|
"CONFIGURATION FILE" section of linkgit:git-config[1];
|
||||||
adding `auto,` at the beginning will emit color only when colors are
|
adding `auto,` at the beginning (e.g. `%C(auto,red)`) will emit
|
||||||
enabled for log output (by `color.diff`, `color.ui`, or `--color`, and
|
color only when colors are enabled for log output (by `color.diff`,
|
||||||
respecting the `auto` settings of the former if we are going to a
|
`color.ui`, or `--color`, and respecting the `auto` settings of the
|
||||||
terminal). `auto` alone (i.e. `%C(auto)`) will turn on auto coloring
|
former if we are going to a terminal). `auto` alone (i.e.
|
||||||
on the next placeholders until the color is switched again.
|
`%C(auto)`) will turn on auto coloring on the next placeholders
|
||||||
|
until the color is switched again.
|
||||||
- '%m': left (`<`), right (`>`) or boundary (`-`) mark
|
- '%m': left (`<`), right (`>`) or boundary (`-`) mark
|
||||||
- '%n': newline
|
- '%n': newline
|
||||||
- '%%': a raw '%'
|
- '%%': a raw '%'
|
||||||
|
Loading…
Reference in New Issue
Block a user