Here is an example of the one I use with MacVIM
#! /usr/bin/env perl use strict; use warnings; use constant DIFF => qw(mvim -d -f); my $parameters = $#ARGV; my $file1 = $ARGV[$parameters - 1]; my $file2 = $ARGV[$parameters]; my $title1 = $ARGV[$parameters - 4]; my $title2 = $ARGV[$parameters - 2]; $ENV{TITLE} = "$title1 - $title2"; system DIFF, '-c', 'let &titlestring=$TITLE', $file1, $file2;
This is a Perl program (but you have Perl on your Mac, so everything is fine).
Basically, you need to know the various parameter positions passed to your program. A quick test shows the following parameters:
-u (Unified Diff)-L (In diff, use the following as the header of the left file)bludgen.pl (revision 63) (name of the left hand)-L (In the diff section, use the following as the header of the right file)bludgen.pl (working copy) (right hand name).svn/text-base/bludgen.pl.svn-base (Left file)bludgen.pl (right file)
More details here .
source share