#!/bin/sh --
# shell wrapper to avoid typing Menu escape sequences
if test $# -eq 0; then
echo "\
usage: `basename $0` cmd
where the most common commands are
	[menu] [menu:name]
	[read:file] [read:file;name]
	[title:string]
	+/path/menu
	+/path/menu/*
	+/menu/path/{-}
	+/menu/path/{item}{rtext} action

	-/*
	-/path/menu
	-/path/menu/*
	-/path/{-}
	-/path/{item}

	<b>Begin<r>Right<l>Left<u>Up<d>Down<e>End
	[done]

	[rm] [rm:] [rm*] [rm:*] [rm:name]
	[swap] [prev] [next]
	[clear] [show] [hide]
	[pixmap:file]
	[dump]
NB: commands may need to be quoted to avoid shell expansion
"
exit
fi
Echo="echo -n"
# some systems/shells don't like `echo -n'
case `/bin/uname` in
    SunOS) Echo="echo";;
esac
while [ $# -gt 0 ]
do
    case $1 in
	+* | -* | '<'* | '['*)		# send raw commands
	$Echo ""
	;;

	*)					# read in menu files
	if test $1 = "default";
	then
	    $Echo ""
	else
	    $Echo ""
	fi
	if test "$COLORTERM" != "rxvt-xpm";	# remove pixmap stuff
	then
	    $Echo ""
	fi
	;;
    esac
    shift
done
exit	# stop shell here!
#-------------------------------------------------------------------------
# since everything before a [menu] tag is ignored, we can put a default
# menu here
#-------------------------------------------------------------------------
[menu:default]

/Programs/*
{Edit}		${EDITOR:-vi}\r
{Top}		top\r
{Dir}		ls -la|${PAGER:-more}\r
{Dir-Time}	ls -lat|${PAGER:-more}\r
{Space Left}	df\r
{-}
{Exit}		exit\r

/Shell/*
{check mail}	checkmail\r
{Background}	^Z bg\r
{Kill}		^C\r

[show]
[done]
#--------------------------------------------------------------------- eof
