tk0miya / diff-highlight

Apache License 2.0
34 stars 6 forks source link

Can diff-highlight be made drop-in replacement for diff? #13

Open pfalcon opened 4 years ago

pfalcon commented 4 years ago

This is absolutely fantastic tool! It works out of the box as expected, unlike some perl mumbo-jumbo.

Can it please be made a drop-in replacement for diff? There're 2 usecases:

  1. diff-highlight -u file1 file2 should popen diff and highlight the output.
  2. diff -u file1 file | diff-highlight should return the same exit code as diff itself (which means that diff-highlight should exit with 0 if diff was empty, and 1 otherwise).
pfalcon commented 4 years ago

It's easy to see that diff-highlight is not actively maintained, so I started a friendly fork to implement these features: https://github.com/pfalcon/diff-hilite .