Skip to content

Instantly share code, notes, and snippets.

@dbeckham
Created July 19, 2013 15:34
Show Gist options
  • Save dbeckham/6040062 to your computer and use it in GitHub Desktop.
Save dbeckham/6040062 to your computer and use it in GitHub Desktop.
Custom bash wrapper function for svn diffs in color using a pager.
# Color diffs for Subversion
#
# Install:
# Add this function to your ~/.bashrc
#
# $ brew install colordiff
# $ source ~/.bashrc
#
function svndiff {
if [[ -t 1 ]]; then
svn diff ${1+"$@"} | colordiff | less -R
else
svn diff ${1+"$@"}
fi
}
# For the lazy:
alias svndi=svndiff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment