Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site redwood.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!zehntel!hplabs!hpda!fortune!rhino!redwood!rpw3
From: rpw3@redwood.UUCP (Rob Warnock)
Newsgroups: net.unix
Subject: Re: use PS1 to give naive users a menu
Message-ID: <129@redwood.UUCP>
Date: Wed, 16-Jan-85 23:22:56 EST
Article-I.D.: redwood.129
Posted: Wed Jan 16 23:22:56 1985
Date-Received: Mon, 21-Jan-85 03:36:08 EST
References: <293@lsuc.UUCP>
Organization: [Consultant], Foster City, CA
Lines: 36

+---------------
| I've found that using the shell's prompt string (PS1) can be
| a really easy way of giving computer-naive users a menu of
| available commands, if the command set they need is very limited.
| ... 
| PS1='Type "mail", "notes", "learntax" or "bye": '
| ...!lsuc!dave | ...!utcsrgv!lsuc!dave
+---------------

(All of this set up in the poor user's ".profile", of course, or in
 /etc/profile for post-Sys-III.)

You can go one farther:

Many terminals have programmable function keys or at least function keys
that can emit a legal UNIX filename with a , such as the Fortune System's
<^A> ("letter" is "a" for f1, etc.), which is also the default for
the Televideo terminals. You can make UNIX commands whose names are (say)
"<^A>c" which can be run by hitting function key 3. ("Hey, don't be mean...")

Then PS1 can have a clear-screen sequence in it, and cursor positioning
stuff, and you can REALLY get a "menu" from a plain Bourne shell!!!
And the function-key-commands can be shell scripts that do "read"s and
interpret more function keys as sub-commands...

And the user "escapes" to UNIX by typing UNIX commands! Amazing!

(Try it... you'll gag! You may even use it!)


Rob Warnock
Systems Architecture Consultant

UUCP:	{ihnp4,ucbvax!dual}!fortune!redwood!rpw3
DDD:	(415)572-2607
USPS:	510 Trinidad Lane, Foster City, CA  94404