void-bash-installer/files/bash/editor.sh

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