git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH] consistently try VISUAL, EDITOR and vi in this order.

From
Junio C Hamano <junkio@cox.net>
Date
Jul 3, 2006, 02:47 UTC
Message-ID
<7vmzbrv1yc.fsf@assigned-by-dhcp.cox.net>

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")
Next: Jakub Narebski
Message 1 of 2 in “consistently try VISUAL, EDITOR and vi in this order.”
  1. consistently try VISUAL, EDITOR and vi in this order.Junio C Hamano, Jul 3, 2006
  2. Jakub NarebskiJul 3, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.