.ds AU "Gary Perlman
.ds LB "Cognitive Science Laboratory
.ds AF "University of California, San Diego
.if \nD .pl 65v \"used with Decwriter III
.ll 6.5i        \"line length
.nh             \"no hyphenation
.nr PW 8.5i	\"page width
.nr si 3n       \"section indentation
.sz 10
.sh 0
.sx 1
.nr bi 5n	\" indent of blocks
.nr xs 0	\"space between index entries
.de TW		\"text width
.br
.if \\$2 .nr PW \\$2u
.lt \\$1u
.ll \\$1u-\\n(siu-\\n(siu
.po (\\n(PWu-\\$1u)u/2u
.in \\n(siu
.br
..
.de FT					\"figure table comment
.nr % \\n%+1
.nr \\$1\\$2 \\n%
..
.de (F \"begin figure
.ls 1
.pn \\n(F\\$1
.ep
.bp
.if \\$1=1 \{
.(x
.sp .5v
.ce
\fBFIGURES\fR
.sp .5v
.)x _
\}
.hh "FIGURE \\$1: \\$2
.sp 5i
.(z F
.nh
\fBNote:\fR
..
.de )F
.)z
.ls
..
.de FR				\" F ratio
(\fIF\fR\ (\\$1,\\$2)\ =\ \\$3,
\fIp\fR\ <\ \\$4)\\$5
..
.de (Q				\" kept quote
.(b L
.(q
.nh
..
.de )Q
.)q
.)b
..
.de (C				\" kept center block
.(b M
.(c
..
.de )C
.)c
.)b
..
.de BO
.if n \&\\$1\h'|0'\&\\$1\h'|0'\\$1\h'|0'\\$1\\$2
.if t .b "\\$1" "\\$2"
..
.de BI
.if n \fI\&\\$1\h'|0'\&\\$1\h'|0'\\$1\h'|0'\\$1\\$2\fR
.if t .b "\\$1" "\\$2"
..
.de hh				\"High heading
.in 0
.ce
.rb
.sz 16
.sp 1.5v
.NE 4i
.BO "\\$1
.(x
.ti 0
\\$1
.)x
.sp .5v
.sz 10
.r
..
.de mh				\"main heading
.b
.ce
.NE 3i
.sz 14
.sp 1v
.BO "\\$1
.sp .75v
.(x
.ti 1c
\\$1
.)x
.r
.sz 10
..
.de lh				\"left heading
.sp .75v
.b
.ti 0
.sz 12
.NE 2i
.BO "\\$1
.sp .5v
.(x
.ti 2c
\\$1
.)x _
.r
.sz 10
..
.de ph				\"paragraph heading
.sp .5v
.NE 1.5i
.pp
.b
\\$1
.r
..
.de RF				\" References
.ep
.bp
'hh "References

..
..
.de NE				\" version of .ne
.ne \\$1
..
.de EG				\" example
.sp .5v
.ce
\\$1
.sp .5v
..
.de (a
.nr aa 1
.de aa )a
.ce
.BO ABSTRACT

..
.ds TL "MENUNIX: A MENU-DRIVEN INTERFACE TO UNIX PROGRAMS (USER MANUAL)
.he 'Gary Perlman'- % -'MENUNIX User Manual'
.bp
.(x
.ti 0
MENUNIX: A MENU-DRIVEN INTERFACE TO UNIX PROGRAMS (USER MANUAL)
.)x
.(l C
.sz 16
.b
MENUNIX: A MENU-DRIVEN INTERFACE
TO UNIX PROGRAMS (USER MANUAL)

.sz 14
Gary Perlman
.r
.sz 10
.)l
.de TC				\"table of contents
.ep
.he ''''
.fo '\\*(dw, \\*(mo \\n(dy''Copyright  c  19\\n(yr Gary Perlman'
.bp
.rs
.(l C
.sz 20
.b
MENUNIX: A MENU-DRIVEN INTERFACE
TO UNIX PROGRAMS (USER MANUAL)
.sp .3i
.sz 16
Gary Perlman
.sp .2i
\\*(LB
Department of Psychology
\\*(AF
.sz 1O
.r
.)l
.sp .3i
.aa
.sp .3i
.ce
.b
.sz 10
CONTENTS
.sz 8

.r
.in 1i \" section names outdented from here
.xp
..
.(a
.(q
.nh
.sz 8
This is a manual for MENUNIX,
an interface to programs and files on the UNIX operating system.
Programs and files are displayed in menus on users' terminal screens,
and are selected with single keypresses of characters displayed
next to menu entries.
The FILE menu presents the UNIX file hierarchy in menu format,
and commands for moving through the hierarchy in both absolute
and relative terms are provided.
The PROGRAM menu organizes UNIX commands into a hierarchy
in which related programs are grouped together into task oriented workbenches,
analogous to files being grouped into directories.
Special commands are provided for setting, examining, and using variables
via a one-line editor that also allows modifying commands.
The PROGRAM menu hierarchy, like the FILE menu hierarchy,
can be customized to the needs of individual users,
allowing workbenches for unusual tasks such as linear programming
in addition to ones for common tasks like writing.
.)q
.)a
.pp
The UNIX\**
.(f
\**UNIX is a trademark of Bell Laboratories.
.)f
menu system, MENUNIX,
provides a structured environment for executing UNIX commands.
MENUNIX presents menus from which you can select
programs and files displayed on a terminal screen.
A diagram of the MENUNIX display is shown in the figure at the beginning
of this manual.
The PROGRAM MENU on the left side of the screen lets you select programs,
and the FILE MENU on the right side lets you select files.
Each of the menu display entries can be selected with a single key,
displayed on the left of each entry.
The effects of selecting PROGRAM and FILE MENU entries will be
described in following sections.
.mh "The FILE MENU
.pp
On the right side of the MENUNIX display is the FILE MENU,
that displays the UNIX file system.
At its top is the full pathname of the current working directory,
followed by the page number and number of pages of that directory
(3/5 means you are on page three of a total of five).
Directories typically have more entries than can
be displayed on a screen,
so each directory is divided into pages,
each containing a manageable sized part.
At most nine files are displayed at one time,
and these are selected with the number keys
.BI 1\-9 .
You can leaf through the pages of a directory by using the plus
and minus keys.
Typing a plus
goes to the next page (if there is one),
and typing a minus goes to the previous one.
Trying to go to a page that is not there causes MENUNIX to
"wrap around" to the first or last page of a directory.
.pp
To select a file, you type the number on the left of its name.
If you type a number without any file beside it
(this can happen on the last page of a directory),
MENUNIX will beep at you.
In general, MENUNIX beeps when you type a character that is not acceptable.
The effect of selecting a file depends on the type of file selected,
that can be determined from the information displayed
on the right of its name.
To the right of a file is displayed its size (in characters),
and its access protection modes.
.pp
The access protection modes contain ten characters interpreted as follows.
The first character indicates the type of file.
.(b
.ta .5i
-	plain file
b	block-type special file
c	character-type special file
d	directory
B	multiplexor-type block special file
C	multiplexor-type character special file
.)b
The next nine characters are interpreted as three sets of three bits.
The first set refers to access permissions of the owner of the file,
the next three to permissions to others in the same user-group,
and the last three to permissions to all others.
Within each set, the three characters respectively indicate permission
to read, write, or execute the file as a program.
These permissions are coded as:
.(b
.ta .5i
r	the file is readable
w	the file is writable
x	the file is executable
-	the indicated permission is not granted
.)b
The owner of the file is coded by capital read, write,
and execute flags.
The owner of a file sees the first three bits in capital letters,
the members of the owner's group see the second three bits
in capital letters, and all others see the last set of three
bits in capitals.
In any case, the operations one can perform
on a file will be in capital letters.
.pp
Selecting a directory causes the working directory
to change to that directory.
Directories are identified by their access modes,
by being followed by a slash,
and on some terminals by being displayed more prominently.
Selecting an executable file (a program) causes that program to be run
after arguments are requested.
Selecting a plain file calls the
editor named by the variable
.BI editor
on that file (or the
.i ex
editor if it is not set).
(See the later section on how to set variables.)
.pp
The number key
.BI 0
is not used to select a file but is reserved for
going "upwards" in the file system.
Pressing the number key to the left of a directory name
goes into the selected directory, and the
.BI 0
key lets you pop out of a directory.
.pp
In summary, the commands for the FILE MENU are:
.(b
.ta .5i
0	Changes the working directory to the parent directory.
1-9	Select the FILE MENU entry beside the number typed.
	This edits files, executes programs, and changes directories.	
+	Displays the next page of the working directory.
-	Displays the previous page of the working directory.
.)b
.mh "The PROGRAM MENU
.pp
On the top left of the MENUNIX display is the PROGRAM MENU.
The PROGRAM MENU organizes programs into a hierarchy
much as the file system can be used to organize files.
Entries in the PROGRAM MENU are either programs,
or collections of programs, called
.i workbenches.
This is analogous to entries in the FILE MENU being files,
or collections of files, called directories.
At the top of the PROGRAM MENU is the name of the workbench in use.
The initial workbench is [UNIX]
(workbenches are always displayed enclosed in [square] brackets).
[UNIX] contains the most general classification of UNIX commands,
so general that it does not contain any programs,
but only names of task specific workbenches that contain all and only those
commands that are of interest to people working on a specific task.
For example,
there is a programming workbench
(that contains more specific workbenches for
C programming, FORTRAN, LISP, Pascal,
and general program development tools.
Other high level workbenches are:
.(b
.ta 2.5i
Calculations	Calculators and statistics
Display	Displaying and formatting files
File System	Programs to change files
Games	The fate of the weak
Information	System status and documentation
Mail	Sending and receiving mail
Network	Intermachine communication
Reminder Service	Get daily reminders of events
Searching, Pattern Matching	Regular expressions, Grammars, etc.
Writing Aids	Spelling, style analysis, etc.
.)b
.pp
Each line of the PROGRAM MENU consists of a short phrase
describing an entry (program or workbench) that
is selected by typing the mnemonic letter on the left of its name.
Selecting a workbench causes
the PROGRAM MENU to change to and display the one selected.
To get back to the [UNIX] workbench, you can type a period,
or repeatedly type commas
that pop up one workbench at a time.
Program entries are displayed followed by the parenthesized name
of the UNIX program they call.
How a program executes depends on whether it needs information,
such as the name of a file.
If no information is needed, the screen clears and the program runs.
After the program is done, MENUNIX will ask you to type a RETURN
if a program is expected to produce some output you might want to read
before the screen is cleared and the MENUNIX display reappears.
.pp
When a program requires that information be specified,
MENUNIX asks for that information in a one-line editor
located at the bottom of the screen.
For example, in the [File\ system] workbench is an entry for
copying files.
Selecting that program causes a prompt like:
.(b
 {files to be copied}:
.)b
to appear in the line editor.
When a program needs information,
a prompt for what is needed is placed in {curly} braces,
for which you should type in the information
(followed by a RETURN to tell it you are finished).
Immediately above the line where you type in the requested information
is the command that MENUNIX is generating.
For the file copying program, this command looks like:
.(b
cp {files to be copied} {destination}
.)b
This means that MENUNIX needs two bits of information from you.
After you supply the {files\ to\ be\ copied} information,
MENUNIX will ask you for the {destination}.
The one-line editor is fully described in a later section.
.mh "The [CONTROL] Menu: Controlling MENUNIX
.pp
There is one workbench, [CONTROL],
that is important because its entries can be accessed at any time,
no matter what workbench is being displayed.
It contains commands for controlling the PROGRAM and FILE MENUs,
and also some commands you are likely to need at any time,
such as your preferred editor,
set with the
.BI editor
variable.
[CONTROL] contains commands for changing directories, changing directory pages,
changing workbenches, stopping MENUNIX, and so on.
Since these commands are used so often,
they become memorized and their display becomes unnecessary.
The [CONTROL] workbench can be seen at any time by "flipping"
to it with an ampersand,
.BI & .
Typing
.BI &
changes the display in the PROGRAM MENU
without changing the commands available,
as though the two workbenches were one on top of the other.
The [CONTROL] workbench options are described below.
.mh "Summary of MENUNIX Internal Commands
.(b
.(c
.sz 8
.ta 1.2i +.5i
.ul
NAME	CHAR	FUNCTION
ampersand	&	flips to/from [CONTROL]
period	.	goes to [UNIX] (first) workbench
colon	:	goes to [UNIX] workbench and returns
comma	,	goes to the parent workbench
zero	0	goes to the parent directory
slash	/	changes directory to that specified in the editor
plus	+	displays the next directory page
minus	-	displays the previous directory page
question	?	changes to/from the documentation perspective
exclamation	!	runs the command supplied in the editor
dollar	$	sets a variable to a value
pound	#	prints the value of a string or variables
\fBCTRL\fR-r	^R	redisplays the screen
.sz 10
.)c
.)b
.lh "Stopping MENUNIX
.pp
\fBBREAK\fR or \fBDEL\fR causes MENUNIX to ask if you really want to quit.
You can type a second \fBBREAK\fR or \fBDEL\fR to quit,
or type a RETURN to return to MENUNIX.
.lh "Redisplaying the Screen
.pp
If the screen gets messed up for some reason,
you can redisplay it by typing \fBCTRL\fR-r.
.lh "Changing Workbenches
.pp
A workbench can be entered by typing the letter beside its name.
You can leave that workbench by "popping" up to its parent workbench
(the workbench you were in before entering it) with a comma.
You can pop up to the [UNIX] workbench by typing a period.
.pp
A special operation is supplied to allow you to take
a short diversion from what you are working on.
For example, MENUNIX may inform you that you have new mail,
and you may want to read it and immediately return to your task.
You can pop up to the [UNIX] workbench
and have MENUNIX remember where you were so that it will return after
you execute a command by popping up to the [UNIX] workbench with a colon.
It also can be used to stop your history list of commands
from getting cluttered with unimportant commands because
commands executed in this manner are not saved.
For example, you may be programming and notice you have mail,
and you could type ":mm" which would read your mail and return
you to your old workbench automatically.
You can make an early return to the saved workbench by typing a second colon.
.lh "Setting Variables
.pp
You can set a variable to a value to be used at a later time.
This is done by typing the character on the left of the
"set variable" command in [CONTROL], the dollar sign,
.BI $ .
The variable setting command will ask you for a {name}
(that must be made entirely of letters),
and then a {value} (that can have any content, even other variables).
Variables can be edited using the one-line editor described later.
.ph "Preset variables.
There are some variables that are set when you go into MENUNIX.
They can be used in your responses to MENUNIX prompts
by preceding their names by
.BI $ .
The predefined variables are:
.(b
.ta .75i
user	your login name
home	your login directory
dir	the current directory
mail	your mail spool file
menu	the menu source directory
.)b
.ph "User defined variables.
When it starts, MENUNIX checks in your home (login)
directory for a file called
.BI ".menuvar
from which it will read any variables you may want defined.
Variables are set by lines in this file of the form:
.(b C
NAME = VALUE
.)b
where NAME is any uninterrupted string of upper or lower case letters,
and VALUE is any text including predefined variables.
For example, you may want to have fast access to directories
you often use, and define the following variables.
.(b
p = $home/papers
pm = $p/menu
pp = $p/personal
.)b
.ph "Examining variables.
You can find the value of a variable by printing a string that includes them.
To print the value of a string,
(this is called interpolation),
the pound sign,
.BI # ,
command is offered in [CONTROL].
Typing
.BI #
results in MENUNIX prompting you for a string at
the bottom of the screen.
If you type in
.(b
$menu
.)b
MENUNIX will print the name of the directory holding the
definition of the PROGRAM MENU hierarchy on the line above.
This directory is discussed in a later section.
If you type RETURN when
.BI #
asks you for a string,
MENUNIX will print all the variable names and values.
.ph "Using variables as commands.
There are nine variables,
.BI 1\-9 ,
that hold the most recently executed commands.
.BI 1
is the most recently executed command,
.BI 2
is the next most recently executed command, and so on.
A few of the most recently executed commands are displayed
in the middle of the MENUNIX display.
You can execute a recently used command by executing
the variable set to it.
Like any variable, you can edit these in the one-line editor described later.
.lh "Executing Commands
.pp
By typing the "Execute command" selector,
.BI ! ,
you can enter any command you would type
in the shell,
.i sh,
outside MENUNIX.
All commands constructed in MENUNIX are executed via
.i sh
so commands can include pattern matching expressions
(such as
.BI *)
and redirection and piping of inputs and outputs.
Executing commands with
.BI !
is useful for repeating a command stored as a variable
on the history list (variables
.BI 1\-9 ).
As an example, suppose that the variable
.BI 3
held the command:
.(b
sort foo.bar
.)b
and that you want to save the result of that command in a file
in your home directory.
You could type a
.BI ! ,
and MENUNIX would ask you for a command to execute,
and you would type in:
.(b
$3 > $home/sorted
.)b
which would sort foo.bar and put the result in the file called "sorted"
in your home (login) directory.
.pp
Instead of typing $3\ >\ $home/sorted,
you can omit the first
.BI $
because MENUNIX checks the first field of all commands
and replaces it with the value of the variable by that name
(if it exists).
.pp
Executing a command with
.BI !
does not update the history variables
.BI 1-9,
but the variable
.BI 0
is always used to construct commands and so can be
accessed to rerun any command.
.lh "Changing Directory
.pp
Besides
.BI 0
(zero), which pops you up one directory,
and selecting directories from the FILE MENU,
you can change directories with the "Change directory" command, the slash,
.BI / .
Typing a slash makes MENUNIX prompt you for the desired new directory.
You can type the full pathname of the directory you want to enter.
This can include variables, as usual.
You can also type RETURN, that has the same effect as typing $home;
both return you to your home directory.
.pp
A common use of variables is to alias directory names,
and because of this, the directory changing command
allows you to change directory directly to a variable name.
So if $foo is /usr/lib/tmac, you can type
.BI /
to change directories, and
.BI foo
to tell MENUNIX where to go; the
.BI $
is not needed.
.lh "Getting Documentation
.pp
By typing the Execution/Documentation character,
.BI ? ,
you change perspectives on the PROGRAM MENU.
Ordinarily, selecting a program causes its execution,
but by typing a
.BI ? ,
you switch into a mode in which
the next PROGRAM MENU program you select will cause MENUNIX
to look for documentation on that program,
even if it is a MENUNIX [CONTROL] command.
Once you get documentation on a program,
MENUNIX automatically puts you back in the execution perspective.
The
.BI ?
is really a toggle for changing perspectives,
so if you go into the documentation perspective and you want out,
another
.BI ?
changes you back.
.mh "Entering Information: MENUNIX's One-Line Editor
.pp
Many commands require you to supply information,
such as the names of file arguments, or option setting flags.
To do this, MENUNIX has you enter information in a one-line editor,
called Line-edit, located at the bottom of the screen,
Line-edit allows you to include and delete characters from
anywhere inside a line you are editing,
as well as insert variables in responses.
When MENUNIX puts you in Line-edit, it is generally to provide
some information for a command it is going to be running.
MENUNIX automatically starts you in "appending text" mode;
everything you type is entered into a buffer.
When in "append" mode, you can enter text and follow with a RETURN,
and MENUNIX will receive what you have typed.
This will be a common use of Line-edit,
however there are times when you will want to change something
you have typed, or perhaps a variable or recent command,
and you will want to get into the middle of a line and make changes.
For this, Line-edit has "cursor mode" in which you can move the cursor
to any point in the line and make changes.
.ph "Moving the cursor.
In cursor mode, you can move to the right or left with
the keys labeled with arrows (if your terminal is so equipped).
An
.BI l
(letter 'el')
moves you one character forward
(as does a space,
.BI + ,
or \fBCTRL\fR-l),
and an
.BI h
moves you one back (as does backspace and
.BI - ).
Capital letters tend to apply to a whole line rather than just a character.
An
.BI L
moves you to the far right of the line, an
.BI H
to the far left.
You can move forward or backward a word at a time with
.BI w
or
.BI b
respectively.
.ph "Adding new text.
To append text after the cursor, type
.BI a ,
and to append text after the end of the line, type
.BI A .
To insert text before the cursor, type
.BI i ,
and to insert text before the beginning of the line, type
.BI I .
Minor mistakes can be corrected by backspacing.
Once in an adding text mode, you can return to cursor mode by typing
the key labeled \fBESC\fR (for escape).
Alternatively, you can type RETURN and MENUNIX will immediately
read what you have typed.
.ph "File selection mode.
In an adding text mode, you can go into a file selection mode
in which the names of files are added to your edit line
as you type the selector numbers beside their names.
File selection mode is entered by typing the file selection character,
the underscore,
.BI _ .
In this mode, every time you type the number beside a file name,
that file name is added to your edit line.
To stop this mode, you can repress the underscore,
which will return you to the editor in an adding text mode,
or press RETURN to send your edit line to MENUNIX.
.ph "Mistakes.
In cursor mode, typing an
.BI x
removes the character under the cursor.
A zero,
.BI 0 ,
deletes the contents of the editor from the cursor to the end of the line.
A capital
.BI X
clears the whole line and automatically puts you into
append mode.
Any mistake you have just made can be undone by pressing
.BI u
which gives you back your edit line as it was before the last change.
If you have really messed things up,
you can type
.BI U
which gives you the line you began editing,
which is unfortunately often nothing.
.ph "Stopping line-edit.
A RETURN will always send what you have typed to MENUNIX,
regardless of mode.
In cursor mode, a
.BI q
can also be used to quit editing.
If you do not want MENUNIX to look at what you have typed,
say to abort a command, you can type
.BI Q .
Also, if you are really desperate, you can type \fBBREAK\fR,
and MENUNIX will ask you if you want to quit MENUNIX completely.
.mh "Summary of Line-Edit Commands
.(b
.(c
.sz 8
.ta 10n
a	append text after the cursor
A	append text after the end of the line
b	back up one word
h	move the cursor back one character
H	move the cursor to the beginning of the line
\fBCTRL\fR-h	go back one character and delete if adding text
l	move the cursor forward one character
L	move the cursor to the end of the line
q	leave Line-Edit and pass back contents
Q	leave Line-Edit and stop command
u	undo the last change
U	undo all changes
w	forward one word
x	delete the character below the cursor
X	delete the contents of the editor and insert
0	delete from the cursor to the end of the line
+	move the cursor forward one character
-	move the cursor back one character
_	enter or leave file selection mode
	ignore the special meaning of the next character
\fBESC\fR	stop adding text
.sz 10
.)c
.)b
.hh "The Menu Definition Language
.pp
Just as you have control over the files in your file system,
you can change the structure of the PROGRAM MENU hierarchy.
A predefined variable in MENUNIX is
.BI menu
that holds the name of the directory holding files that
define the PROGRAM MENU hierarchy,
that contains two special files:
UNIX
which
defines the [UNIX] workbench and all subsidiary workbenches;
and
CONTROL
defines the [CONTROL] workbench of commands available
at all parts of MENUNIX.
.pp
In $menu is a file called UNIX that has lines that define
.np
The name of each entry in the [UNIX] workbench,
.np
The one character selector for that entry,
.np
The type of the entry (whether the entry is that of a workbench
or a program).
For program entries, arguments may be supplied.
.lp
Each part of a workbench entry is defined by a bracketed field of the form:
.(b C
[NAME:VALUE]
.)b
where NAME specifies the name of the field,
and VALUE specifies its value.
For example, the [UNIX] workbench has the definition:
.(b C
[display:UNIX][selector:.][menu:UNIX]
.)b
This definition says that "UNIX" should be displayed on the
right of the selector character
.BI '.'
and that its selection
will cause the display of a menu whose definition is in
the directory $menu in a file called "UNIX."
An example of a program entry is that for the copy command:
.(b C
[disp:Copy files][sel:c][prog:cp][args:{files} {destination}]
.)b
which says that "Copy files" should be displayed on the right of
the selector character "c" and that its selection will
cause the execution of the UNIX
.i cp 
command.
.(b C
c    Copy files (cp)
.)b
Since there is an argument field,
MENUNIX knows to append it to the call to
.i cp.
Anything in the argument field
is interpolated and copied unless there is a part of the field
enclosed in {curly} braces.
MENUNIX uses the convention that anything in curly braces
is to be used as a prompt to get a response from the user.
For each of the braced parts of the argument VALUE field,
MENUNIX presents that part to the user
and replaces it with the interpolated response typed in.
.pp
As a summary,
each line of a workbench file defines a workbench entry
that is either for another workbench (defined in an other file),
or a program that may have arguments that the user may have to supply.
Each entry is divided into [NAME:VALUE] fields.
The names of these fields (that may be abbreviated to just one character)
are listed below,
along with a description of their uses.
.ip display 10
Defines what is displayed.
.ip selector 10
Defines the character to be used to select the entry.
.ip menu 10
Defines that the entry is that of a workbench menu.
the VALUE field holds the name of the file in $menu
that contains the definition of the menu.
.ip program 10
Defines the name of the UNIX program to be executed when
the entry is selected.
If the entry is for a workbench, this field is ignored.
.ip arguments 10
Supplies information to be appended to a UNIX command
defined by the program field.
This information can be regular text, including variables,
which is interpolated and appended,
or it can be enclosed in {curly} braces,
which is replaced by the interpolated response obtained from the user after
presenting the braced pattern.
.ip waitoff 10
Tells MENUNIX to clear the screen and redisplay without
user permission after a UNIX program has been executed.
Without this field, MENUNIX asks permission with a prompt.
The waitoff field has no value.
.lp
.mh "Defining the [CONTROL] Workbench
.pp
The [UNIX] workbench is defined by a special file in the
$menu directory, $menu/UNIX.
Another special file, used to define the [CONTROL] workbench,
is $menu/CONTROL.
The definition for $menu/CONTROL is just like any other workbench,
but the commands in [CONTROL] are available at
all parts of the PROGRAM MENU.
This is because MENUNIX searches menus in a specific order
for the selector character typed.
First MENUNIX sees if the user has typed any of the numbers
.BI 1\-9 ,
used to  access file entries.
Then MENUNIX checks [CONTROL], and finally the
current workbench.
This means that the numbers
.BI 1\-9
are permanently reserved,
and that any characters in [CONTROL] should be
carefully selected because they will not be available for
any other menus.
.pp
The programs that are used in [CONTROL] should also
be carefully selected because only fifteen entries are allowed.
The entries should be reserved especially for the commands
MENUNIX uses to control the display, called internal commands
whose names are preceded by a minus.
The internal commands available are listed below.
After the letter is its default selector character in parentheses.
In $menu/CONTROL,
the selectors for these internal commands are defined,
so if you don't like using a selector,
you can choose your own.
.(b
.ce
MENUNIX Internal Commands

.(c
.sz 8
.ta 12n
u(.)	changes the workbench to [UNIX]
a(:)	changes the workbench to [UNIX] and returns
f(&)	flips the PROGRAM MENU display to [CONTROL]
p(,)	changes the workbench to the parent menu
0(0)	changes the working directory to the parent directory
c(/)	changes directory
+(+)	displays the next directory page
-(-)	displays the previous directory page
d(?)	changes to and from the documentation perspective
s(!)	runs a command typed in the line-editor
v($)	sets a variable to a value
i(#)	prints the value of a string or prints all variable values
r(\fBCTRL\fR-r)	redisplays the screen
.sz 10
.)c
.)b
.mh "Making Your Own Menu System
.pp
Changing $menu makes it possible to customize
the PROGRAM MENU hierarchy to your liking.
when you fire up MENUNIX,
you can add an argument to the program call that sets
.BI menu.
This must be the complete pathname of the directory with
the files defining the PROGRAM MENU hierarchy.
To make your own PROGRAM MENU hierarchy,
you would create a directory with the files UNIX and CONTROL,
which refer to other files (containing workbenches)
in the directory you supplied to the call to MENUNIX.
A good way to begin is to copy all the files from the
standard $menu to your preferred $menu,
and then make modifications.
.(b M
[Writing aids]                          /csl/perlman/papers/                 1/2
a    Analyze style (style)              1    CausalInferenc/      144 dRWXr-xr-x
c    Count words and lines (wc)         2    ComputPgmg/          112 dRWXr-xr-x
C    Count words used (tokens)          3    Discrimination/       48 dRWX------
d    Decode/Encode (crypt)              4    ExptControl/         528 dRWXr-xr-x
e    Edit a file ($editor)              5    IntfaceDesign/       176 dRWXr-xr-x
f    [Format text file]                 6    MenUnix/             240 dRWXr-xr-x
h    Heading structure (headings)       7    NatArtLang/          160 dRWXr-xr-x
l    Look for word in dictionary (look) 8    ONR/                 112 dRWXr-xr-x
p    Permuted indexer (ptx)             9    Personal/            112 dRWXr-xr-x
r <- Reference finder (pub)                                                     
s    Spelling error finder (spell)                                              
S    Spelling corrector (correct)                                               
t    Typo finder (typo)                                                         
w    Wordy sentence finder (diction)    You have new mail.                      
                                        Friday, November 6.  3:41:59            
$1 diction MenUnix/design | more                                                
$2 style MenUnix/design | more                                                  
$3 headings hh mh lh ph MenUnix/design | more                                   
$4 correct MenUnix/design                                                       

COMMAND: pub '{probe}'                                                          
{probe}: (subject | title) = (design                                            
Adding text: quit with ESC, select files with '_'                               
.)b
.TC
