Use a more robust method for checking for vim's presence

This commit is contained in:
David Thurstenson 2021-05-29 03:48:18 -05:00
parent b10410c20b
commit c563477f3e
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
HISTCONTROL=ignoreboth
# Prefer vim, but if it's not installed, nano will do
if [[ -s /usr/bin/vim ]]; then
if which vim 1>&- 2>&- ; then
export EDITOR=vim
else
export EDITOR=nano