2011-09-25 19:45:51 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# This script tries to exec an editor by trying some known editors if $EDITOR is
|
|
|
|
# not set.
|
|
|
|
#
|
|
|
|
# Distributions/packagers can enhance this script with a
|
|
|
|
# distribution-specific mechanism to find the preferred pager.
|
2011-11-19 15:10:39 +01:00
|
|
|
[ -n "$VISUAL" ] && which $VISUAL >/dev/null && exec $VISUAL "$@"
|
|
|
|
[ -n "$EDITOR" ] && which $EDITOR >/dev/null && exec $EDITOR "$@"
|
2011-09-25 19:45:51 +02:00
|
|
|
|
|
|
|
# Hopefully one of these is installed (no flamewars about preference please!):
|
|
|
|
which nano >/dev/null && exec nano "$@"
|
|
|
|
which vim >/dev/null && exec vim "$@"
|
|
|
|
which vi >/dev/null && exec vi "$@"
|
|
|
|
which emacs >/dev/null && exec emacs "$@"
|