#!/bin/sh # Order of preference # gnuclient # jed # juno # vi # nano # ed # modify the gsrvdir check to search for directories that are owned by me if [ -x /usr/bin/gnuclient ] && [ -x /usr/bin/emacs ]; then if ( gnuclient -batch < /dev/null >/dev/null); then exec gnuclient "$@"; fi; fi; if [ -x /usr/bin/jed ]; then exec jed "$@"; fi; if [ -x /usr/bin/juno ]; then exec juno "$@"; fi; if [ -x /usr/bin/vi ]; then exec vi "$@"; fi; if [ -x /usr/bin/nano ]; then exec nano "$@"; fi; if [ -x /usr/bin/ed ]; then exec ed "$@"; fi; echo "Unable to find a suitable editor" >/dev/stderr; exit 1;