Custom Rules
Understanding how to apply color to uncolored content.
Custom colorization rules can be provided in the form of a JSON file. An example of such a file is as foll
name
This can be any name that helps you to identify the purpose of the rule. It's not used by Tailed itself.
pattern
This is a regular expression used to select the text for colorization. Ensure it is escaped correctly for JSON (e.g. \s
would need to be encoded as \\s
).
By default, the whole of the expression is colorized. If you'd prefer to only colorize a substring of the text, collect that text within a named group called c
:
The regular expression is applied to the content on a line-by-line basis.
ignore_case
Whether or not the regular expression must be evaluated on a case-sensitive or case-insensitive basis.
foreground
The choice of font color. Possible choices are:
Default
Black
Red
Green
Yellow
Blue
Magenta
Cyan
White
BrightBlack
BrightRed
BrightGreen
BrightYellow
BrightBlue
BrightMagenta
BrightCyan
BrightWhite
background
The choice of background color. The list of possible choices are the same as for foreground
.
first_only
If true
, only the first instance of the text matching the regular expression within the line is colorized.
If false
, every instance of text matching the regular expression within the line is colorized.
Last updated