2 # This script tries to exec an editor by trying some known editors if $EDITOR is
5 # Distributions/packagers can enhance this script with a
6 # distribution-specific mechanism to find the preferred pager.
7 [ -n "$VISUAL" ] && which $VISUAL >/dev/null && exec $VISUAL "$@"
8 [ -n "$EDITOR" ] && which $EDITOR >/dev/null && exec $EDITOR "$@"
10 # Hopefully one of these is installed (no flamewars about preference please!):
11 which nano >/dev/null && exec nano "$@"
12 which vim >/dev/null && exec vim "$@"
13 which vi >/dev/null && exec vi "$@"
14 which emacs >/dev/null && exec emacs "$@"