I’d like svn diff to display colored diff through a pager (just like git does). I’ve succeeded to get a colored diff by setting the diff-cmd in ~/.subversion/config:
diff-cmd = colordiff
Now I’d like to pipe the diff output through a pager, how do I do that? (Short of writing svn diff | less, of course.)
In the past I’ve used a wrapper script and set
diff-cmdto this script:But then you get a separate pager for every file, I’m not sure if this is what you want. Nowadays I just write
svn diff | less.Another easy solution is making an alias:
alias svndiff='svn diff | less'. Or if you want to usesvn diff, make a shell function: