Crates.io | grc-rs |
lib.rs | grc-rs |
version | 0.3.2 |
source | src |
created_at | 2021-09-27 14:44:14.365594 |
updated_at | 2021-10-18 11:58:18.997192 |
description | Generic Colouriser ported to Rust |
homepage | https://github.com/larsch/grc-rs |
repository | https://github.com/larsch/grc-rs |
max_upload_size | |
id | 457029 |
size | 32,260 |
Generic colouriser for the output for many programs (A port of grc + grcat to
rust). grc
must be installed as its configuration files are used.
Colouring rules work as good as 'grc'. Replacement/skip/count not yet implemented.
Installation via cargo will give you the binary, but not the man page and zsh
shell completion script.
cargo install grc-rs
From AUR:
yay -S grc-rs
Or manually, which will also install man page and zsh completions:
cargo build --release
sudo make install
Either create shell aliases for the command that you want colourised:
alias mount='grc-rs mount'
or use the --aliases
option to generate a list. The brave can put this in
~/.bashrc
or ~/.zshrc
, but things may break.
eval $(grc-rs --aliases)
Configuration files are in same format as grc
/grcat
. grc-rs supports
reading from additional configuration, /etc/grc-rs.conf
, ~/.grc-rs
, and
~/.config/grc-rs/grc-rs
. Colouring rules will be searched for in additional
paths /usr/share/grc-rs
, ~/.config/grc-rs
and ~/.local/share/grc-rs
.
To extend the existing configuration for a command that is already configured,
simply add a new rule in ~/.config/grc-rs/grc-rs
and have a unique
conf.command
. To replace existing rules for a known command, create
~/.config/grc-rs/conf.command
and it will be used instead of the one from
/usr/share/grc
.