diff options
author | joeyh <joeyh> | 2006-07-26 02:46:50 +0000 |
---|---|---|
committer | joeyh <joeyh> | 2006-07-26 02:46:50 +0000 |
commit | 92f6884638abdda0fd8140379fcfc2ed36c37679 (patch) | |
tree | 6a152ba8180f345c32676ff1a806a8af35b7cfc4 | |
parent | 11a51513fff47e8756ecdc1f24703b540c309eb5 (diff) | |
download | moreutils-92f6884638abdda0fd8140379fcfc2ed36c37679.tar.gz |
* 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
-rw-r--r-- | debian/changelog | 3 | ||||
-rwxr-xr-x | vidir | 5 | ||||
-rwxr-xr-x | vipe | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index db55dc9..2e639a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ moreutils (0.15) UNRELEASED; urgency=low 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 @@ -39,7 +39,7 @@ Verbosely display the actions taken by the program. =item EDITOR -Editor to use. Defaults to vi if not set. +Editor to use. =item VISUAL @@ -104,6 +104,9 @@ foreach (@dir) { close OUT; my @editor="vi"; +if (-x "/usr/bin/editor") { + @editor="/usr/bin/editor"; +} if (exists $ENV{EDITOR}) { @editor=split(' ', $ENV{EDITOR}); } @@ -19,7 +19,7 @@ edit the data that is being piped between programs. =item EDITOR -Editor to use. Defaults to vi if not set. +Editor to use. =item VISUAL @@ -52,6 +52,9 @@ close STDOUT; 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}); } |