;
                                  SH.COM                                      

             Size (recs) CRC   Version    Author/Latest Issue      Disk
               4k (32)   6EBE  2.0        Dreas Nielsen 5/87       Z3COM8

  1- Syntax  2- Command Line History/Editing  3- Notes  4- Error Messages     



   SH is a variable expansion and command history shell for ZCPR3.  It prompts 
the user for a command line,  performs  an interpretation on the command line, 
and either executes the command line itself or passes the line on to the ZCPR3 
Command Processor.  Original by R. Conn 3/84.
:1
 
 
   Syntax:  SH [shfile.ft]


:2

Command Line History/Editing:

   The up- and down-arrow keys,  as defined in the TCAP,  allow  you  to  move
backward or forward through the history list.  Input editor commands are:

Line editor:
	^S or left-arrow key defined in TCAP : move left 1 char
	^D or right-arrow key defined in TCAP : move right 1 char
	^E : erase to [E]nd of line
	^U : delete char [U]nder cursor
	^W : delete [W]ord forward
	^X : kill entire line, OR EXIT if at beginning of empty line
	DEL : delete char before cursor
	TAB : move to end of line, or if at end, to beginning
	^A : move to beginning of previous word
	^F : move to beginning of next word
	^H : delete char before cursor
	^Q : [Q]uote next char--insert char literal
	^C : reboot if at beginning of line.


Command-Line History/Editing (continued):

History control:
	^P or up-arrow key defined in TCAP : previous command line
	^N or down-arrow key defined in TCAP : next (old) command line.
	^R : previous command line (same as up-arrow)

     Cursor  keys  are evaluated  first,  and  may  override  others  if  they
generate  a corresponding  code.   For instance,  on '83 Kaypros the backspace
key will move  left  rather than deleting left.   Use  of CP/M  standard  line
editing  keys  (^E, ^U, ^R,  & ^X)  will,  it  is  hoped,  reduce  other  such 
conflicts.

     Note that  the ^P printer toggle does not  work inside this input editor;
the keystroke now defaults to another function.


Command-Line History/Editing (continued):

     As with version 1.1,  the line  will  scroll within  a window  determined
by the screen width of the currently defined CRT device.  Up to 127 characters
may  be  entered,  and the editor  is always in  "insert" mode.  Unlike the ^R 
command  in version 1.1,  recall  of  a previous command line results  in  the 
entire command  line being replaced rather than just the portion following the 
cursor.

     The command history is kept in a file named SH.HST.   This file is placed
in  the  "ROOT" directory or  in the directory  at the bottom  of the  path if 
"ROOT" doesn't exist.   Within the file,  each command line occupies  its  own 
length plus one byte for a trailing null.   The  entire list  of  commands  is 
terminated by a ^Z.   Since the maximum number  of characters  per line is 127 
and the maximum number of lines is 20, this file will never be more than about
2.5k long.   In practice  it  will generally be  quite a bit smaller, and thus 
will load quite quickly.
:3

SH Notes:

   a. The three internal  commands  supported  by  SH  have  been  deleted  in
      vs 2.0.   A new means of exiting--^X in the first position of the line--
      is now used.  Vs 2.0 also adds an alternative load address for use under
      ZCPR 3.3.
:4

Error Messages:

   a. "No Shell Stack"         <-- a Shell Stack has not been installed in the
                                   ZCPR3 system and SH cannot run

   b. "Shell Stack Full"       <-- there is not enough room on the Shell Stack
                                   for SH to push itself and SH cannot run

   c. "Shell Stack Entry Size  <-- the Shell Stack entries are too short for
                                   SH to define the parameters it needs to
                                   control its operation.  SH cannot run.

