CDIFF(1)

NAME
cdiff - show diffs with colors

SYNOPSIS
cdiff [diff ...]

DESCRIPTION
cdiff 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 results to less(1). If used on a color terminal, it makes diffs much easier to read. There is also handling of "cvs annotate" in it.

AUTHORS
cdiff was written by Eivind Eklund <eivind@FreeBSD.org>. based on a sed line somebody passed around. The code is (much) smaller than this man page.

SEE ALSO
diff(1), less(1), cvs(1).

BUGS
cdiff assumes standard ANSI color escape sequences (as used by xterm and most other commonly used terminals), rather than using curses(3).

cdiff should really be a large and complex C program based on less(1) 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 spaces.)