-
Took some time, but finally: if you want to recolour git diff or wdiff -3 output: sed "s/\[-/
echo -e \"\x1b\"[91m[-/g; \ s/-\]/echo -e \-]"\x1b\"[0m/g; \ s/{+/echo -e \"\x1b\"[92m{+/g; \ s/+}/echo -e \+}"\x1b\"[0m/g;" -
I'm diffing two latex source files, and the old one was committed with CR rather than CRLF, so I wanted to strip them out from the git diff --word-diff output, but keep the colouring.
davidjamesweir’s Twitter Archive—№ 1,013