How can I get SnailSvn to run a custom diff command?
With the help of this answer, I found eval:
#!/bin/bash
args=$(grep opendiff &quot;$@&quot; | sed -e 's,&quot;/Applications/Xcode.app/Contents/Developer/usr/bin/opendiff&quot;,/usr/local/bin/mvimdiff,')
echo diff: $args &gt;&gt; ~/snailsvndifftool.log 2&gt;&amp;1
# What's this shady thing?
eval       $args &gt;&gt; ~/snailsvndifftool.log 2&gt;&amp;1

However, doing eval on arbitrary arguments seems unnecessarily insecure and I couldn't get arrays to work (i.e., mvimdiff ${args[@]}), so instead I force mvimdiff to be at the beginning of the line and only allow a set of characters:
#!/bin/bash

args=$(grep opendiff &quot;$@&quot; | sed -E 's,&quot;/Applications/Xcode.app/Contents/Developer/usr/bin/opendiff&quot;,,; s/[^A-Za-z0-9.~/&quot;_ -]//g; s,^,/usr/local/bin/mvimdiff,')
echo diff: $args &gt;&gt; ~/snailsvndifftool.log 2&gt;&amp;1
eval $args &gt;&gt; ~/snailsvndifftool.log 2&gt;&amp;1

There's probably something I'm missing, so I hope someone has a better answer.