bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

diff --color options?


From: Bruno Haible
Subject: diff --color options?
Date: Mon, 13 Jan 2003 13:49:55 +0100 (CET)

Hi,

GNU diff's current output formats are suitable for monochrome displays.
With today's color displays, it would be possible to display the same
information in a more compact and more intelligible way. I would suggest
two new output formats for diff, each in two variants (--html for HTML
output, otherwise xterm/ANSI color escape sequences):

1) cvsweb like color output. This is like --side-by-side with hunks,
with removed lines (on the left side) in #ff9999, added lines (on the right
side) in #ccccff, and changed lines (on both sides) in #99ff99.

2) ediff like color output. This is like -u with hunks, with old text
in one color and new text in another color, and also inter-line comparison
of the text (see also function fstrcmp()).


Also quite useful would be a variant of the --side-by-side option that
also works well for large file with few differences, i.e. which outputs
hunks, like a mix between context diff and side-by-side:

***********
       Hunk 1 from file A              Hunk 1 from file B
***********
       Hunk 2 from file A              Hunk 2 from file B
***********
       Hunk 3 from file A              Hunk 3 from file B

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]