$PLAN9/bin
fi
+# --- Find whether a program exists ---
+
+__mdw_programp () { type -t >/dev/null "$1"; }
+
# --- And the same for manual pages ---
case "$MACHTIME" in
export EDITOR=ed
for ed in "emacs21 -nw" "emacs -nw" vi pico nano ae; do
name=`echo $ed | sed 's/ .*$//'`
- if type -t >/dev/null "$name"; then
+ if __mdw_programp "$name"; then
EDITOR=$ed
break
fi