wdiff-bugs
[Top][All Lists]
Advanced

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

[wdiff-bugs] Colored diff similar to the output of git-diff


From: Peng Yu
Subject: [wdiff-bugs] Colored diff similar to the output of git-diff
Date: Tue, 27 Dec 2016 16:44:05 -0600

Hi,

seq 100 | sed -e 's/50/x 50/g' -e 's/70/x 70/g' > "$tmpfile1"
seq 100 | sed -e 's/50/y 50/g' -e 's/70/y 70/g' > "$tmpfile2"

Suppose that I create the above files. If I use the following git diff
command, I will see an output like this where changes with a line is
shown as colored [-blah-]{+blah+} along with file names --- a.... +++
b... and line numbers like @@ -50 + 50 @@. Is there a way to format
the wdiff output similar to git-diff --no-index?

git diff --no-index -U0 --word-diff -- "$tmpfile1" "$tmpfile2"

--- a/var/folders/r7/bvmh1vvx41d63snvgbdz7bl40000gr/T/tmp.oQwSHzzikN
+++ b/var/folders/r7/bvmh1vvx41d63snvgbdz7bl40000gr/T/tmp.10v4xJqaIV
@@ -50 +50 @@
[-x-]{+y+} 50
@@ -70 +70 @@
[-x-]{+y+} 70

-- 
Regards,
Peng



reply via email to

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