Author: bapt
Date: Sat May  7 18:48:48 2016
New Revision: 299218
URL: https://svnweb.freebsd.org/changeset/base/299218

Log:
  Only use EDITOR as a variable to specify which text editor to use

Modified:
  head/usr.bin/sdiff/edit.c
  head/usr.bin/sdiff/sdiff.1

Modified: head/usr.bin/sdiff/edit.c
==============================================================================
--- head/usr.bin/sdiff/edit.c   Sat May  7 18:44:30 2016        (r299217)
+++ head/usr.bin/sdiff/edit.c   Sat May  7 18:48:48 2016        (r299218)
@@ -40,10 +40,7 @@ editit(const char *pathname)
        int saved_errno, st, ret = -1;
        const char *ed;
 
-       ed = getenv("VISUAL");
-       if (ed == NULL)
-               ed = getenv("EDITOR");
-       if (ed == NULL)
+       if ((ed = getenv("EDITOR")) == NULL)
                ed = _PATH_VI;
 
        sighup = signal(SIGHUP, SIG_IGN);

Modified: head/usr.bin/sdiff/sdiff.1
==============================================================================
--- head/usr.bin/sdiff/sdiff.1  Sat May  7 18:44:30 2016        (r299217)
+++ head/usr.bin/sdiff/sdiff.1  Sat May  7 18:48:48 2016        (r299218)
@@ -4,7 +4,7 @@
 .\" Written by Raymond Lai <r...@cyth.net>.
 .\" Public domain.
 .\"
-.Dd $Mdocdate: July 5 2012 $
+.Dd May 7, 2016
 .Dt SDIFF 1
 .Os
 .Sh NAME
@@ -50,8 +50,6 @@ into
 In this mode, the user is prompted for each set of differences.
 See
 .Ev EDITOR
-and
-.Ev VISUAL ,
 below,
 for details of which editor, if any, is invoked.
 .Pp
@@ -133,22 +131,10 @@ Change the size of tabs (default is 8.)
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width Ds
-.It Ev EDITOR , VISUAL
+.It Ev EDITOR
 Specifies an editor to use with the
 .Fl o
 option.
-If both
-.Ev EDITOR
-and
-.Ev VISUAL
-are set,
-.Ev VISUAL
-takes precedence.
-If neither
-.Ev EDITOR
-nor
-.Ev VISUAL
-are set,
 the default is
 .Xr vi 1 .
 .It Ev TMPDIR
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to