hi - highlight things in a stream of output
hi [options] [regex color [regex color [regex color [...]]]] --list-colors --list -l: list the available colors and exit --nixnics --noex -x: do not use the extended color nicknames --trunc -t: truncate lines to this width (argument required) --help -h: this help --command -c: fork and execute this command and pipe it through hi --file -f: read regex/color pairs from file(s)
Intended as a pipe colorizer
ps auxfw | hi jettero sky root red ^nobody orange sudo tail -f /var/log/vsftpd.log | hi CONNECT.* umber OK.UPLOAD.* lime getent passwd | hi -f username -f shell '\d+' pink
Regex and color pairs may be supplied not only via parameters, but also using one or several external files (see EXAMPLES). Each file should contain a valid Perl code returns ARRAYref. The contents of it will be prepended to the ARGV AS-IS, see below.
[ jettero => 'sky', root => 'red', '(?<=:)/[^:]+(?=:)' => 'lime', ],
SHELL = hi interesting.*thing umber default:
Although, the output probably isn't quite what you'd expect. Make prints the commands before it forks the subshell. So whatever hi prints instead already has all the make substitutions completed. ls $(something) turns into ls /whatever/something/was. Worse, -c gets passed whatever the Makefile executes, not just commands it would have (or did) print.
hi
ls $(something)
ls /whatever/something/was
-c
It's probably not usable like this without some clever make tricks.
You can report bugs either via rt.cpan.org or via the issue tracking system on github. I'm likely to notice either fairly quickly.
Paul Miller <jettero@cpan.org>
<jettero@cpan.org>
Copyright 2014 Paul Miller -- released under the GPL
perl(1), Term::ANSIColor, Term::ANSIColorx::AutoFilterFH, Term::ANSIColorx::ColorNicknames
To install Term::ANSIColorx::ColorNicknames, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Term::ANSIColorx::ColorNicknames
CPAN shell
perl -MCPAN -e shell install Term::ANSIColorx::ColorNicknames
For more information on module installation, please visit the detailed CPAN module installation guide.