repo.or.cz
/
sgn-devtools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
don't background the editor if we are not under X
[sgn-devtools.git]
/
e
blob
1c68a5ba25829065ed3698a580646da27e282b07
1
#!/usr/bin/env perl
2
use
strict
;
3
use
warnings
;
4
my
@filelist
=
split
/\n/
,
`editfind
@ARGV
`
5
or
exit
1
;
6
7
my
$should_background
=
defined
$ENV
{
DISPLAY
} &&
$ENV
{
EDITOR
} !~
m!/vim|^vim$!
;
8
9
if
( !
$should_background
|| !
fork
) {
10
exec
$ENV
{
EDITOR
},
@filelist
;
11
}