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 /vidir | |
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
Diffstat (limited to 'vidir')
-rwxr-xr-x | vidir | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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}); } |