I\'ve tried various forms of the following in a bash script:
#!/bin/bash
svn diff $@ --diff-cmd /usr/bin/diff -x \"-y -w -p -W $COLUMNS\"
B
Note that COLUMNS is:
SIGWINCH signal.That second point usually means that your COLUMNS variable will only be set in your interactive shell, not in a bash script.
If your script's stdin is connected to your terminal you can manually look up the width of your terminal by asking your terminal:
tput cols
And to use this in your SVN command:
svn diff "$@" --diff-cmd /usr/bin/diff -x "-y -w -p -W $(tput cols)"
(Note: you should quote "$@" and stay away from eval ;-))