void-bash-installer/files/bash/editor.sh
2021-04-18 21:15:25 +02:00

14 lines
218 B
Bash

if command -v nano > /dev/null; then
e=nano
elif command -v nvim > /dev/null; then
e=nvim
elif command -v vim > /dev/null; then
e=vim
fi
export EDITOR="${e}"
export VISUAL="${e}"
export SUDO_EDITOR="${e}"
unset e