don't background the editor if we are not under X
[sgn-devtools.git] / e
blob1c68a5ba25829065ed3698a580646da27e282b07
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
4 my @filelist = split /\n/, `editfind @ARGV`
5 or exit 1;
7 my $should_background = defined $ENV{DISPLAY} && $ENV{EDITOR} !~ m!/vim|^vim$!;
9 if ( !$should_background || !fork ) {
10 exec $ENV{EDITOR}, @filelist;