From owner-svn-src-all@freebsd.org Sat May 7 18:58:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8753DB31A01; Sat, 7 May 2016 18:58:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 587B51DB9; Sat, 7 May 2016 18:58:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u47Iw7UV010533; Sat, 7 May 2016 18:58:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u47Iw7eE010531; Sat, 7 May 2016 18:58:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201605071858.u47Iw7eE010531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 May 2016 18:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299220 - head/usr.bin/sdiff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2016 18:58:08 -0000 Author: bapt Date: Sat May 7 18:58:07 2016 New Revision: 299220 URL: https://svnweb.freebsd.org/changeset/base/299220 Log: Revert r299218 VISUAL is actually a perfecly valid env to specify an editor 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:54:35 2016 (r299219) +++ head/usr.bin/sdiff/edit.c Sat May 7 18:58:07 2016 (r299220) @@ -40,7 +40,10 @@ editit(const char *pathname) int saved_errno, st, ret = -1; const char *ed; - if ((ed = getenv("EDITOR")) == NULL) + ed = getenv("VISUAL"); + if (ed == NULL) + ed = getenv("EDITOR"); + if (ed == 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:54:35 2016 (r299219) +++ head/usr.bin/sdiff/sdiff.1 Sat May 7 18:58:07 2016 (r299220) @@ -4,7 +4,7 @@ .\" Written by Raymond Lai . .\" Public domain. .\" -.Dd May 7, 2016 +.Dd $Mdocdate: July 5 2012 $ .Dt SDIFF 1 .Os .Sh NAME @@ -50,6 +50,8 @@ 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 @@ -131,10 +133,22 @@ Change the size of tabs (default is 8.) .El .Sh ENVIRONMENT .Bl -tag -width Ds -.It Ev EDITOR +.It Ev EDITOR , VISUAL 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