Created
July 16, 2010 08:55
-
-
Save shoorick/478159 to your computer and use it in GitHub Desktop.
Diff colorizer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -n | |
use Term::ANSIColor; | |
print colored( $_, 'red' ) and next if /^</; | |
print colored( $_, 'green' ) and next if /^>/; | |
print colored( $_, 'bold blue' ) and next if /^[\d,]+[acd][\d,]+$/; | |
print; | |
=head1 NAME | |
Diff Colorizer | |
=head1 DESCRIPTION | |
Colorize output of diff: left parts becomes red, right ones becomes green and line numbers becomes bold blue | |
=head1 AUTHOR | |
Alexander Sapozhnikov | |
L<< http://shoorick.ru/ >> | |
L<< E<lt>[email protected]<gt> >> | |
=cut |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment