1

I know there are GUI's that show word-diffs in three-way diff, and there are command line tools that show two-way word-highlighting diffs.

But is there a command-line way I can show three-way diffs with word-higlighting the same way that I can get two-way diffs word-higlighted with diff -u a b | dwdiff -u ?

unhammer
  • 4,306
  • 2
  • 39
  • 52

1 Answers1

0

git diff (which you can use outside a Git repository with --no-index, but that would be a two-way diff) does have word diff (--word-diff, with regex if needed, using --word-diff-regex).

See also color-words:

color words

That would be a command-line way to get a word diff.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • `dwdiff` already does this without even needing git. The question is about **three-way** word diffs – unhammer May 14 '19 at 07:56
  • @unhammer three-way (that I present here: https://stackoverflow.com/a/4130766/6309) means a version history in order to get a common ancestor. Hence Git. I don't know of command-line tool which would take three arguments (remote, local, base) *and* does word-diff highlighting. – VonC May 14 '19 at 08:03