Scroll to navigation

RAINBOW(1) General Commands Manual RAINBOW(1)

NAME

rainbow - Colorize commands output using patterns.

SYNOPSIS

rainbow [rainbow options...] command [command args...]

command [command args...] | rainbow [rainbow options...]

DESCRIPTION

Display commands output colored matching words or regular expressions. If you don't specify a command, STDIN is used.

OPTIONS

These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.

Common options


show program's version number and exit.


show help message and exit.


Print config paths and exit.


Print config names and exit.


Load a config file defining patterns. Go to /usr/share/rainbow/configs for examples. The option can be called
several times.


Disable STDERR filtering, which can have unexpected effects on commands directly using tty (such as top).

Foreground color - Use these options to associate patterns to text foreground colors.


print pattern in red


print pattern in light red


print pattern in green


print pattern in light green


print pattern in yellow


print pattern in light yellow


print pattern in blue


print pattern in light blue


print pattern in magenta


print pattern in cyan


print pattern in light cyan


toggle foreground to red on beginning of pattern


toggle foreground to light red on beginning of pattern


toggle foreground to green on beginning of pattern


toggle foreground to light green on beginning of pattern


toggle foreground to yellow on beginning of pattern


toggle foreground to light yellow on beginning of pattern


toggle foreground to blue on beginning of pattern


toggle foreground to light blue on beginning of pattern


toggle foreground to magenta on beginning of pattern


toggle foreground to cyan on beginning of pattern


toggle foreground to light cyan on beginning of pattern


reset foreground color on beginning of pattern


toggle foreground to red on end of pattern


toggle foreground to light red on end of pattern


toggle foreground to green on end of pattern


toggle foreground to light green on end of pattern


toggle foreground to yellow on end of pattern


toggle foreground to light yellow on end of pattern


toggle foreground to blue on end of pattern


toggle foreground to light blue on end of pattern


toggle foreground to magenta on end of pattern


toggle foreground to cyan on end of pattern


toggle foreground to light cyan on end of pattern


reset foreground color on end of pattern

Background color - Use these options to associate patterns to text background colors.


print pattern with red background


print pattern with light red background


print pattern with green background


print pattern with light green background


print pattern with yellow background


print pattern with light yellow background


print pattern with blue background


print pattern with light blue background


print pattern with magenta background


print pattern with cyan background


print pattern with light cyan background


toggle background to red on beginning of pattern


toggle background to light red on beginning of pattern


toggle background to green on beginning of pattern


toggle background to light green on beginning of pattern


toggle background to yellow on beginning of pattern


toggle background to light yellow on beginning of pattern


toggle background to blue on beginning of pattern


toggle background to light blue on beginning of pattern


toggle background to magenta on beginning of pattern


toggle background to cyan on beginning of pattern


toggle background to light cyan on beginning of pattern


reset background color on beginning of pattern


toggle background to red on end of pattern


toggle background to light red on end of pattern


toggle background to green on end of pattern


toggle background to light green on end of pattern


toggle background to yellow on end of pattern


toggle background to light yellow on end of pattern


toggle background to blue on end of pattern


toggle background to light blue on end of pattern


toggle background to magenta on end of pattern


toggle background to cyan on end of pattern


toggle background to light cyan on end of pattern


reset background color on end of pattern

Text effects - Use these options to associate patterns to text effects.


print pattern in bold


toggle bold on beginning of pattern


toggle bold on end of pattern


print pattern with decreased intensity


toggle faint on beginning of pattern


toggle faint on end of pattern


reset text intensity (bold, faint) on beginning of pattern


reset text intensity (bold, faint) on end of pattern


print pattern in italic


toggle italic on beginning of pattern


toggle italic on end of pattern


reset italic on beginning of pattern


reset italic on end of pattern


print pattern underlined


toggle underline on beginning of pattern


toggle underline on end of pattern


print pattern double underlined


toggle double underline on beginning of pattern


toggle double underline on end of pattern


reset underline on beginning of pattern


reset underline on end of pattern


print pattern blinking


toggle blinking on beginning of pattern


toggle blinking on end of pattern


print pattern blinking rapidly


toggle rapid blinking on beginning of pattern


toggle rapid blinking on end of pattern


reset blinking on beginning of pattern


reset blinking on end of pattern


print pattern swapping foreground and background


toggle negative on beginning of pattern


toggle negative on end of pattern


reset negative on beginning of pattern


reset negative on end of pattern


print pattern hidden


toggle hiding on beginning of pattern


toggle hiding on end of pattern


reset hiding on beginning of pattern


reset hiding on end of pattern


reset all colors


reset all colors on beginning of pattern


reset all colors on end of pattern

EXAMPLES

rainbow diff file1 file2

rainbow ping www.google.com

rainbow --red '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' ping www.google.com

tail -f my-file.log | rainbow --config my-config

CONFIGS

rainbow --config MY_CONFIG

rainbow will look for the config at the following places, in the following order:
* $RAINBOW_CONFIGS/MY_CONFIG
* $RAINBOW_CONFIGS/MY_CONFIG.cfg
* $XDG_CONFIG_HOME/rainbow/MY_CONFIG
* $XDG_CONFIG_HOME/rainbow/MY_CONFIG.cfg
* ~/.rainbow/MY_CONFIG
* ~/.rainbow/MY_CONFIG.cfg
* /etc/rainbow/MY_CONFIG
* /etc/rainbow/MY_CONFIG.cfg
* <rainbow builtin configs>/MY_CONFIG
* <rainbow builtin configs>/usr/share/rainbow/configs/MY_CONFIG.cfg

rainbow comes bundled with several configs, for example for the ping, top and diff commands, for Tomcat/JBoss logs, etc. You can override the default configs with your own ones by placing them in $RAINBOW_CONFIGS, ~/.rainbow or /etc/rainbow.

BUGS

Please report bugs to https://github.com/nicoulaj/rainbow/issues.

AUTHOR

This manual page was written by Julien Nicoulaud <julien.nicoulaud@gmail.com>, for the rainbow project (https://github.com/nicoulaj/rainbow), and may be used by others.