gettext: The --color option
1
1 9.11.1 The ‘--color’ option
1 ---------------------------
1
1 The ‘--color=WHEN’ option specifies under which conditions colorized
1 output should be generated. The WHEN part can be one of the following:
1
1 ‘always’
1 ‘yes’
1 The output will be colorized.
1
1 ‘never’
1 ‘no’
1 The output will not be colorized.
1
1 ‘auto’
1 ‘tty’
1 The output will be colorized if the output device is a tty, i.e.
1 when the output goes directly to a text screen or terminal emulator
1 window.
1
1 ‘html’
1 The output will be colorized and be in HTML format.
1
1 ‘--color’ is equivalent to ‘--color=yes’. The default is
1 ‘--color=auto’.
1
1 Thus, a command like ‘msgcat vi.po’ will produce colorized output
1 when called by itself in a command window. Whereas in a pipe, such as
1 ‘msgcat vi.po | less -R’, it will not produce colorized output. To get
1 colorized output in this situation nevertheless, use the command ‘msgcat
1 --color vi.po | less -R’.
1
1 The ‘--color=html’ option will produce output that can be viewed in a
1 browser. This can be useful, for example, for Indic languages, because
1 the renderic of Indic scripts in browser is usually better than in
1 terminal emulators.
1
1 Note that the output produced with the ‘--color’ option is _not_ a
1 valid PO file in itself. It contains additional terminal-specific
1 escape sequences or HTML tags. A PO file reader will give a syntax
1 error when confronted with such content. Except for the ‘--color=html’
1 case, you therefore normally don’t need to save output produced with the
1 ‘--color’ option in a file.
1