updated git and svn scripts
[xrzperl.git] / r-edit
blob055ba335e6adfbe5a95b72ff699f977d5991367e
1 #!/usr/bin/perl
2 use ENV qw/OS XAUTHORITY DISPLAY/;
3 my @w=qw/notepad++.bat/;
4 my @g=qw/gvim -f/;
5 my @c=qw/vim/;
6 my @editor;
8 if($ENV{OS} =~ m/Windows/i) {
9 @editor= @w;
10 shift @ARGV if(@ARGV and $ARGV[0] eq '-b');
11 if(-f "/bin/cygpath.exe") {
12 foreach(@ARGV) {
13 #die("cygpath $_");
14 $_ = `cygpath -w "$_"`;
15 # if(m/^\//);
19 elsif($XAUTHORITY or $DISPLAY) {
20 @editor= @g;
22 else{
23 @editor = @c;
25 print STDERR join(" ",@editor,@ARGV),"\n";
26 exec @editor,@ARGV;