Created
March 24, 2010 18:56
-
-
Save pawelz/342642 to your computer and use it in GitHub Desktop.
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
diffcol() { | |
sed -e ' | |
s,^[,^[[44m^[^[[49m,g; | |
s,^G,^[[44m^G^[[49m,g; | |
s,^\(Index:\|diff\|---\|+++\) .*$,^[[32m&,; | |
s,^@@ ,^[[33m&,; | |
s,^-,^[[35m&,; | |
s,^+,^[[36m&,; | |
s,\r,^[[44m^M^[[49m,g; | |
s, , ,g; | |
s,\([^[:space:]]\)\([[:space:]]\+\)$,\1^[[41m\2^[[49m,g; | |
s,$,^[[0m, | |
' ${1:+"$@"} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment