* [RFC/PATCH] consistently try VISUAL, EDITOR and vi in this order.
@ 2006-07-03 2:47 Junio C Hamano
2006-07-03 9:24 ` Jakub Narebski
0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2006-07-03 2:47 UTC (permalink / raw)
To: git
git grep -e VISUAL -e EDITOR revealed this inconsistency. All
other commands seem to check VISUAL and then EDITOR as they should.
---
diff --git a/git-send-email.perl b/git-send-email.perl
index c5d9e73..7b81962 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -222,8 +256,7 @@ GIT: for the patch you are writing.
EOT
close(C);
- my $editor = $ENV{EDITOR};
- $editor = 'vi' unless defined $editor;
+ my $editor = $ENV{VISUAL} || $ENV{EDITOR} || 'vi';
system($editor, $compose_filename);
open(C2,">",$compose_filename . ".final")
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC/PATCH] consistently try VISUAL, EDITOR and vi in this order.
2006-07-03 2:47 [RFC/PATCH] consistently try VISUAL, EDITOR and vi in this order Junio C Hamano
@ 2006-07-03 9:24 ` Jakub Narebski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Narebski @ 2006-07-03 9:24 UTC (permalink / raw)
To: git
Junio C Hamano wrote:
> git grep -e VISUAL -e EDITOR revealed this inconsistency. All
> other commands seem to check VISUAL and then EDITOR as they should.
>
> + my $editor = $ENV{VISUAL} || $ENV{EDITOR} || 'vi';
> system($editor, $compose_filename);
Shouldn't we check if we are in visual (non CLI-only) environment,
like X-Window, MS Windows or MacOS X, before trying to use VISUAL?
How other parts solve it? </me checks> Ah, we use VISUAL unconditionally,
at least in scripts...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-03 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-03 2:47 [RFC/PATCH] consistently try VISUAL, EDITOR and vi in this order Junio C Hamano
2006-07-03 9:24 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).