From 3e0a391732350157ab06bb14ac685160416573fa Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 14 May 2017 22:59:13 +1200 Subject: Just use whichever vi(1) we need as VISUAL This avoids an unwanted situation on e.g. Debian minimal where the default Vi implementation is a stripped-down Vim that doesn't use vim(1) as a name, so stuff like sudoedit(8) breaks looking for it and falls back on EDITOR. --- sh/profile.d/visual.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sh') diff --git a/sh/profile.d/visual.sh b/sh/profile.d/visual.sh index d03da255..38ab9893 100644 --- a/sh/profile.d/visual.sh +++ b/sh/profile.d/visual.sh @@ -1,7 +1,3 @@ -# Set visual editor; vim if we've got it, but vi will do fine -if command -v vim >/dev/null 2>&1 ; then - VISUAL=vim -else - VISUAL=vi -fi +# Use first found implementation of vi(1) +VISUAL=vi export VISUAL -- cgit v1.2.3