Hi Dave.
On Tue, 2012-07-10 at 10:17 +0100, Dave Ewart wrote: > It depends on your circumstances, but for use with colordiff it's > required in order to catch diffs which cross multiple lines. colordiff > processes each line as it reads it and thus the wdiff markers need to > appear on each line: that's what the -n option does; you can test this > by giving one of your test files a large paragraph of text which the > other lacks, compare the output of 'wdiff' against 'wdiff -n'. If your > changes are always small and reside within a single line, then 'wdiff' > and 'wdiff -n' return the same output. Ah I see,... thanks. > I suggest a shell function instead of an alias, perhaps > something like this: I also thought about this at first (and writing one is obviously very simple and a one liner...) But a) The advantage of an alias is, that it's surely never accidentally used in non-interactive shells... which could easily happen with a function, if non properly handled... b) It would sound reasonable to me in general, that when wdiff mode is specified as diff mode,... "colordiff a b" uses wdiff. btw: One further question,... dies colordiff detect whether the output is connected to a terminal,... and only then (!!) modify the output (by color codes)? Ever thought about making patches for diff/wdiff themselves that add --color support? Cheers, Chris.
smime.p7s
Description: S/MIME cryptographic signature