Colorize commands output using patterns.
Project description
Easily colorize commands output using patterns.
rainbow [ --COLOR=PATTERN ... | --conf CONF ] COMMAND
Examples
Using the command line
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
Using configs
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.
Installation
Using packages
System |
Installation instructions |
---|---|
Debian / Ubuntu |
|
Fedora / CentOS / RHEL / Scientific Linux |
|
OpenSUSE / SLE |
|
Arch Linux |
|
pip / easy_install |
Building from sources
You can build from sources this way:
git clone git://github.com/nicoulaj/rainbow.git cd rainbow python setup.py build install --user
Contributing
Contributions are welcome, please see CONTRIBUTING.
License
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rainbow-2.8.0.tar.gz
.
File metadata
- Download URL: rainbow-2.8.0.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f150efa649f13e9abbe75c6390519da109ad8fd06d62d5508d3a163a1fb2b5b9 |
|
MD5 | b7ce00c122848ea5c0cfd8db9818381c |
|
BLAKE2b-256 | 8a9e03c284f4f7c741d46eeb2bdd185d19e640d7be575469a5a754934d9304f0 |
File details
Details for the file rainbow-2.8.0-py2.py3-none-any.whl
.
File metadata
- Download URL: rainbow-2.8.0-py2.py3-none-any.whl
- Upload date:
- Size: 47.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b4670f41e27ad8a765dd720403060eb5ef03c2909e66bf3d80d473fb8f8ae60 |
|
MD5 | bd838caa3c2d93574c8ed1776982d8f9 |
|
BLAKE2b-256 | c8a4b4b4ce962c8478ccb222bcdae209b4ce7d706995be277895fa660d14429e |