Section: User Commands (1)
Return to Main Contents
- show diffs with colors
reads a unidiff or context diff from stdin or a set of (optionally compressed)
files and URLs, adds color codes, expands tabs to 8 spaces, and passes the
If used on a color terminal, it makes diffs much easier to read.
There is also handling of "cvs annotate" in it.
Use bold, reverse and underline codes (for monochrome terminals).
The color codes used to add. Default is 1:34:31:35, for lines begin with "@", "-", "+" and "!".
was written by
An Eivind Eklund Aq eivind@FreeBSD.org .
based on a sed line somebody passed around. The code is (much) smaller than
this man page.
assumes standard ANSI color escape sequences (as used by xterm and most other
commonly used terminals), rather than using
should really be a large and complex C program based on
and a diff library. This would allow a more informative display, including
collapsing pure deletions/insertions inside a single line to one line with
colors for deleted/added material, avoiding the line-wrap problems in less
due to less not knowing the effects or lengths of the color escape codes,
and correct handling of shifted tabs (instead of just expanding them to
- SEE ALSO
linux.jgfs.net manual pages