


MENU(1)                                                   MENU(1)


NNAAMMEE
       menu - Runs the PSC Menu System.

SSYYNNOOPPSSIISS
       menu [ menu_directory ]

DDEESSCCRRIIPPTTIIOONN
       Menu  is  a  menu system that is capable of doing any unix
       command from the "menu".  The individual  menus  are  read
       from  menu  files  that are located in a "menu" directory.
       The menu files are simple text files that  may  be  edited
       with any editor.  The "menu" is flexable, the only command
       line argument that is accepted is the name of a  directory
       in which the menu files are located.  The menu will accept
       the "~" in the directory argument to specify a users  home
       directory.   A  default directory is specified in the menu
       header file.

SSEELLEECCTTIINNGG IITTEEMMSS && UUSSIINNGG BBUUIILLTTIINN CCOOMMMMAANNDDSS
       An item is selected from the menu simply by  entering  the
       corre- sponding number that is displayed for the item.  It
       is important to know that you should not enter the  selec-
       tion  and then press return.  The return key has a special
       function.  The return key tells the menu to  back  up  one
       menu  unless  you  are  in  the main menu, where it has no
       effect.  The PSC menu system contains  built  in  commands
       that  allow you to: change directory, execute a shell com-
       mand, do directory listings, quit menu, help  and  re-draw
       the  screen.  See  the  section on the "Built in Menu" for
       more details.


BBUUIILLTT IINN MMEENNUU
       The Built in menu is a pop-up window that displays a  list
       of  builtin commands accessable.  This menu is accessed by
       entering the letter 'h' from any menu accept  the  builtin
       menu.   Options  in this menu are: c, d, h, l, m, p, q, x,
       ?, L, P and <ctrl-R>.  These characters cause the  follow-
       ing affects:

            'c' - Change to a new working directory.

            'd' - Get a short directory listing of the current directory.

            'h' - Use the builtin help menu.

            'l' - Get a long directory listing of the current directory.

            'm' - Return to the "main" menu.  (main.menu)

            'p' - Go to the previous menu.  This assumes that the last
                  entry in the menu is a return to previous menu.  If it
                  is not, it will execute the last entry a command.




Newwords+ Manual            June 1990                           1





MENU(1)                                                   MENU(1)


            'q' - Quit the Menu.

            'x' - Execute a shell command.

            '?' - Get help on a specified menu entry.  The help file for
                  that entry must exist for help to be given.

            'L' - Log off the system.  This assumes that you ran the menu
                  from your login shell.  If you did not do this it will
                     kill the shell it was run from.

            'P' - Print a file using the visual directory to select the
                  file to be printed.

            <ctrl-R> Re-draw the screen in cases where you get garbled.
                        (control key and 'R' are pressed at the same time).


MMEENNUU FFIILLEESS
       The  Menu  files  have a specific format that must be fol-
       lowed.  The first character in each line must be $, ?,  #,
       %,  +, *, @, &, 1, 2, 3, 4, 5, 6.  These are "key" charac-
       ters that tell "menu" what kind of operation is to be per-
       formed.

       '$'      This  character  means that this line is the menu
       header for this menu, this must be the first character  in
       the  line.   This  must  always  be  the first line in the
       "menu" file.  The second character in this line is skipped
       anything  after  the  second  column is interpreted as the
       menu heading.

       '?'  This character means that this line is a  comment  to
       be displayed to the user when they use the menu.

       '#'  This  character means that this line is a the name or
       path to the help file on a menu selection.

       '%'   Execute in a sub-shell but do not use  the  continue
       line  upon  completion  of  command.   Similar  to the '*'
       option.

       '+'     This character means that  output  from  the  name
       program be output to the "menu" window.  It is best if the
       output is 70 columns  wide  or  less,  anything  after  70
       columns  is  chopped off. Some good examples are ls and ls
       -l.  Any program which actually does  screen  manipulation
       cannot  use the '+' option (It Will really get messed up).

       '@'   This character specifies that the menu to be  loaded
       is  to be considered the main menu so that pressing return
       will not do anything.

       '&'   This character specifies a menu to be  loaded.   The



Newwords+ Manual            June 1990                           2





MENU(1)                                                   MENU(1)


       path  to the menu file is the default or the specified one
       given in the command argument.

       '*'   This character means that the invoked  program  will
       interfere  with  the "menu" window.  Such programs include
       more, less and any games.

       '1'    This  character  specifies  that  an  argument   is
       expected  to  be  given  to the program to be run.  A good
       example would be: vi <filename>.

       '2'   This character specifies that  two  file  names  are
       expected  as  arguments for the program to be run.  A good
       exmample would be: cp <file1> <file2>.

       '3'    This  character  specifies  that  a  user  name  is
       expected as an argument for the program to be run.  A good
       exapmple would be:   mail <user>.

       '4'   This character specifies a topic to be  used  as  an
       argument  to  the program to be run.  A good example would
       be: man <topic>.

       '5'     Execute a C-Shell command with a file name  as  an
       argument.   Uses  visual  directory  listing and a file is
       selected by using the arrow keys.  Useful  when  you  know
       the file must exist.

       '6'  Execute  a  command  in a pipe with a file name as an
       argument.  Uses visual directory listing  and  a  file  is
       selected  by  using  the arrow keys.  Useful when you know
       the file must exist.

       'd'  Change to  directory  before  executing  command.   A
       trailing  slash indicates to lock the user into the speci-
       fied directory.


DDEEFFAAUULLTTSS
            The menu program looks for a file called  "main.menu"
       in  the  default or specified directory.  If the Directory
       does not exist or is not accessable the program will  tell
       you  of  the  condition  and  quietly  exit.   If the file
       "main.menu" does not exist in the named directory the pro-
       gram will notify you that it could not find any menu files
       and quietly exits.  The return key if pressed will do  the
       last  thing in the menu, unless that menu is defined to be
       the main menu (this is done to make it easy to back out of
       menus  assuming  of course that return to previous menu is
       that last option in that menu).  Note also that a "%s" can
       be used to substitute an argument in a command.

EEXXAAMMPPLLEE MMEENNUU FFIILLEE
       $ File Management Menu



Newwords+ Manual            June 1990                           3





MENU(1)                                                   MENU(1)


       5 /bin/rm -i
       # /usr/local/lib/menu_help/remove.hlp
       ? Remove a file.
       2 /bin/cp -i
       ? Copy a file.
       5 nroff -man %s | more
       ? Nroff a file
       5 rm -i
       ? Remove a single file.
       * rm -i *
       ? Cleanup your files.
       + /bin/ls -l
       ? List your Files.
       & menu.1
       ? Return to main Menu.


CCAAUUTTIIOONNSS
       If  you  use the '+' menu command that tells the menu pro-
       gram to send output to the menu window with a command that
       uses  cursor addressing or requires user input you may get
       some rather interesting results.



































Newwords+ Manual            June 1990                           4


