aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/visual.sh
blob: 94aee96337d575995715aeb01c358696a8dc8e01 (plain)
1
2
3
4
5
6
7
8
9
# If emacs is installed, and ~/.emacs exists, use emacs as the visual editor;
# otherwise, use the system's vi
if command -v emacs >/dev/null 2>&1 &&
    [ -f "$HOME"/.emacs ] ; then
    VISUAL=emacs
else
    VISUAL=vi
fi
export VISUAL