Only set ALTERNATE_EDITOR to nano if nano is in PATH

This commit is contained in:
tastytea 2022-04-03 04:42:47 +02:00
parent 5e925e84a8
commit ecc61cb747
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -31,12 +31,12 @@ elif command -v emacs > /dev/null; then
VISUAL="$(command -v emacs)" VISUAL="$(command -v emacs)"
elif command -v nano > /dev/null; then elif command -v nano > /dev/null; then
VISUAL="$(command -v nano)" VISUAL="$(command -v nano)"
export ALTERNATE_EDITOR="$(command -v nano)"
elif command -v vim > /dev/null; then elif command -v vim > /dev/null; then
VISUAL="$(command -v vim)" VISUAL="$(command -v vim)"
fi fi
export VISUAL export VISUAL
export EDITOR="${VISUAL}" export EDITOR="${VISUAL}"
export ALTERNATE_EDITOR="$(command -v nano)"
############################# Plugins ########################################## ############################# Plugins ##########################################