diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-14 22:59:13 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-14 22:59:13 +1200 |
commit | 3e0a391732350157ab06bb14ac685160416573fa (patch) | |
tree | ce6a8847c312894410d9a4d87d5a1f520660212e /sh/profile.d/visual.sh | |
parent | Move exm(1df) test into EDITOR selection (diff) | |
download | dotfiles-3e0a391732350157ab06bb14ac685160416573fa.tar.gz dotfiles-3e0a391732350157ab06bb14ac685160416573fa.zip |
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.
Diffstat (limited to 'sh/profile.d/visual.sh')
-rw-r--r-- | sh/profile.d/visual.sh | 8 |
1 files changed, 2 insertions, 6 deletions
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 |