From c563477f3e3a8d37736c18834b5f474a97fcb3e5 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Sat, 29 May 2021 03:48:18 -0500 Subject: [PATCH] Use a more robust method for checking for vim's presence --- .bashrc.d/11-env.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc.d/11-env.bash b/.bashrc.d/11-env.bash index a8ce950..bc8f325 100644 --- a/.bashrc.d/11-env.bash +++ b/.bashrc.d/11-env.bash @@ -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