How do you get a pager in svn diff?
I usually run svn diff | vim -
.
In the past I've used a wrapper script and set diff-cmd
to this script:
#!/bin/sh
colordiff "$@" | less -r
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 use svn diff
, make a shell function:
svn() {
if [ x"$1" = xdiff ] || [ x"$1" = xdi ]; then
/usr/bin/svn "$@" | less -r
else
/usr/bin/svn "$@"
fi
}