Easily colorize commands output using patterns.
rainbow [ --COLOR=PATTERN ... | --conf CONF ] COMMAND
Prepend rainbow
with --COLOR=PATTERN
associations to your
command, for example:
Tail some log file with lines containing
ERROR
in red:rainbow --red=ERROR tail -f /var/log/my.log
You can also pipe commands output into rainbow:
tail -f /var/log/my.log | rainbow --red=ERROR
Rainbow can load configuration for each command from files, which is the most convenient way to use it. When running rainbow mycommand
, rainbow will automatically look for a config named mycommand.cfg
in ~/.config/rainbow
, ~/.rainbow
, /etc/rainbow
, or builtin configs:
Colorize the
diff
command output using the builtin config:rainbow diff file1 file2
Start my custom command, using
~/.rainbow/mycommand.cfg
:rainbow mycommand
The syntax for writing configs is straightforward, see the builtin configs for examples. See also the commands support table.
System | Installation instructions |
---|---|
Debian / RPM based | rainbow repository (sources here) |
Arch Linux | AUR/rainbow / AUR/rainbow-git |
pip | PyPI: rainbow |
You can build from sources this way:
git clone git://github.com/nicoulaj/rainbow.git cd rainbow python setup.py build install --user
Contributions are welcome, please see CONTRIBUTING.
This project is a fork of Linibou's colorex.
It is is released under the terms of the GNU General Public
License. See COPYING
for
details.