]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/diff-filter
.bashrc: Add docker-related helper aliases
[dotfiles.git] / bin / diff-filter
1 #!/bin/sh
2 # Filter script for git-diff patch output
3
4 # Use `diff-highlight` if available
5 # Look for script in several expected locations
6 for f in \
7 $HOME/bin/diff-highlight \
8 /usr/local/share/git-core/contrib/diff-highlight/diff-highlight \
9 /usr/share/git-core/contrib/diff-highlight/diff-highlight
10 do
11 test -x $f && \
12 test -z $DIFFHIGHLIGHT_OFF && \
13 tee | $f && \
14 exit 0
15 done
16 # Else, degrade gracefully
17 tee