Next: Reseq, Previous: Output Format, Up: Top [Contents][Index]
Teseq can provide color formatting to its output. This feature is
disabled by default, but can be activated via --color=auto
or --color=always.
If ‘auto’ is used, then color will be added to the output only if
the output is to a terminal; otherwise not.
If ‘always’ is specified, then color formatting codes will be
provided for the output unconditionally. Note that such output may not
be fed to reseq
, which will not be able to handle these codes.
The default colors used are suitable for use against a dark/black background, but may be less suitable for use on terminals with light-colored backgrounds. The colors used may be altered by setting the environment variable ‘TESEQ_COLORS’. It consists of comma-separated key=value pairs, where the key is usually the prefix character of the line to be colored, and the value consists of parameter values for the terminal SGR control. Any prefixes not specified in ‘TESEQ_COLORS’ retain their default values.
In the case of text lines, in which literal text is bracketed by pipe characters (‘|’), color may be specified separately for the inner text, and for the bracketing pipes, including the ‘|-’ and ‘-|’ around formatting (non-literal) line breaks, and any final ‘.’ signifying a literal line break. The inner text is specified by the key ‘|>’, while the decorations are specified by the key ‘|’. Currently, no default color settings are made for the decorations; only the inner text.
Here is an example setting for TESEQ_COLORS:
TESEQ_COLORS='|>=36;7,|=1,.=31,:=33,&=35,"=32,3=4'
This sets the literal text content of text lines to a cyan foreground, and then standout (reverse) mode, so that the result is a cyan background with a foreground of whatever the usual background would be (i.e., if the background is normally black, then the foreground will be black). The color of the text line decorations is not changed, but the decorations are displayed in bold. Control lines (‘.’) are set to red, escape-sequence lines (‘:’) are set to amber, label lines (‘&’) to violet, descriptions (‘"’) to green, and delay lines (‘@’) to blue.
Note that halt lines (lines consisting of exactly ‘@@@’), though recognized by reseq, are never emitted by teseq, and thus have no means of specification in ‘TESEQ_COLORS’.
Next: Reseq, Previous: Output Format, Up: Top [Contents][Index]