arn't set, to comply with Debian policy. For portability, fall back to vi
if there's no /usr/bin/editor. Closes: #378623
a file. Changed behavior to just print all lines from both files, even
if this means printing dups. Not sure I like this behavior either, but
it's consistent with the very useful behaviors of "and" and "not".
+ * vidir, vipe: Use /usr/bin/editor if it's present, and EDITOR and VISUAL
+ arn't set, to comply with Debian policy. For portability, fall back to vi
+ if there's no /usr/bin/editor. Closes: #378623
-- Joey Hess <joeyh@debian.org> Tue, 25 Jul 2006 22:26:56 -0400
=item EDITOR
-Editor to use. Defaults to vi if not set.
+Editor to use.
=item VISUAL
close OUT;
my @editor="vi";
+if (-x "/usr/bin/editor") {
+ @editor="/usr/bin/editor";
+}
if (exists $ENV{EDITOR}) {
@editor=split(' ', $ENV{EDITOR});
}
=item EDITOR
-Editor to use. Defaults to vi if not set.
+Editor to use.
=item VISUAL
open(STDOUT, ">/dev/tty") || die "reopen stdout: $!";
my @editor="vi";
+if (-x "/usr/bin/editor") {
+ @editor="/usr/bin/editor";
+}
if (exists $ENV{EDITOR}) {
@editor=split(' ', $ENV{EDITOR});
}