;
                              COMMAND SUMMARY 

   The commands which follow are installed with LSHINST.  Run the installation
program to  see  the  current  control  key set.   (The default  is similar to 
WordStar.)  Commands marked with "*" are ignored in  single-line mode.   Those
with "-" are not installed.

                            E - Editing Functions 
                            Q - Queue Functions
                            S - Special Functions
                            K - Shift Keys 
                            M - Moving Text
:K
 SHIFT KEYS 

All of the   editor  control keys  are  single bytes.  The number of available
functions is expanded by  using  leadin  keys  to  trigger  a search for those 
command characters with some of their  high bits set (handled automatically by
the installation program).  Four lead-in keys are available.

Usage is: <lead-in key> <shifted key>.  Example:  ^KQ (or ^K^Q).

Lead-in key #1         (ESC)
Lead-in key #2         (^K)
Lead-in key #3         (^Q)
Lead-in key #4         
:E
 EDITING FUNCTIONS - 1/2 

Entry key        CR  Command execution key
Backspace       BSP  Non-destructive
Char left        ^S  Same as backspace
Char right       ^D
Line up          ^E  Go to start of previous line
Line down        ^X  Go to start of next line
Word right       ^F  (Word separator characters may be installed)
Word left        ^A
Line end/ start  ^J  First to line end.  If there, to start
Line start      ^QS
Line end        ^QD
Up screen *      ^R  First to top of screen, then previous screen
Down screen *    ^C  First to bottom of screen, then next screen
First screen     ^W  Top of file
Last  screen     ^Z  End of file.  (Quickest way to append to log)
 EDITING FUNCTIONS - 2/2 

Delete char      ^G  At cursor
Delete left     DEL  Destructive backspace
Delete word rt   ^T
Delete line      ^Y  Deleted line saved to kill buffer
Delete to EOL   ^QY  Saved to kill buffer.  UNKILL recovers.     
Carriage rtn      -  Usually preempted by the ENTRY key
New line         ^N  Same as <cr> in INSERT mode
Insert/overwr    ^V  Toggle text insertion mode
Dupicate line    ^B  Duplicate current line
Undelete         ^U  Recover text deleted with DELEOL or DELLINE
Unchange line   ^QU  Restart current line (doesn't work after DELLINE)
Control key      ^P  Trigger for control key insertion
Clear to EOF    ^KZ  Zap everything from cursor to end of file
TAB               -  Insert a tab
:Q
 QUEUE FUNCTIONS   (* None are available in single-line mode)

Use the queue to re-organize the history file by  picking up lines one  by one
in the order you want them, then unloading the queue.

Keep and kill   ^KK  Save line, delete it, advance to next
Insert Q        ^KI  Insert queue contents at line
Insert & clr    ^KV  Insert queue, then clear it
Clear Q         ^KY
:S
 SPECIAL FUNCTIONS 

Old line srch    ^O  Look for match to current line up to cursor
Search dir    ESC O  Toggle search direction forward or backward
Line sequence    ^L  Go to line after one last executed
Auto seg      ESC L  Automatic return to next line on reentry
Toggle save   ESC S  Recording on/off
Quit shell    ESC Q  Finished with LSH
Mode        ESC ESC  Full-screen mode / single-line mode
Warm boot     ESC C  Do warm boot if at beginning of line
Pause *      ESC CR  Shell pause for key strike before reentry
Text lines *  ESC T  Set # lines for SCREEN mode
Time display   "     LINE mode, show time in system prompt
Token         TAB #  Replicate, save tokens 1...9
Mark place      ^QZ  Line markers are retained in log file
Go to mark      ^QP  Any number may be set
Clear markers   ^QQ  Deletes all place markers
HELP          ESC J  Run preset command line - HELPLSH.COM
 ENTRY KEY   <CR>

   The entry  key causes  the  current line  to execute  as  a  command.   For 
editing purposes, a ^N will substitute for <CR>.   (It inserts  a <CR>  at the 
cursor.)  If you want the <CR> available for editing,  you may install another
control character as the entry key.  
 SPECIAL FUNCTIONS   <ESC> 

        <ESC> Q - QUIT the shell
          "   C - Warm boot  [ ^C not available ]
          "  CR - Execute line with shell PAUSE.
          "   S - Toggle SAVE on/off
          "   T - Set number of TEXT lines. [ 1 .. screen size ]
          "   L - Toggle LINE sequencing
          " ESC - Toggle MODE of operation [full screen or line]
          "   O - Toggle OLD string search direction
          "   J - HELP screen

   Many functions have  no analog in a pure editor.   LSH requires commands to
stop the shell,  initiate  a warm boot,  and pause  before shell execution (to 
look at the screen before it is wiped out).   Most of these have been assigned 
to the escape key.
 SWITCH MODES   <ESC><ESC>

   LSH operates in two modes.   In LINE mode, LSH shows a system prompt pretty
much as usual.   LSH's presence is  not that obvious until you make use of its
editing features or recall old lines. 

   In SCREEN mode,  a  selectable number  of  command lines  appear in  a text 
window at the top of the screen.   You have what amounts to  a menu of command 
lines to choose from.  Move the cursor to a line, press <CR>, and it executes.
Screen mode is handy for editing, reaaranging, or just viewing the log file.

   [The "modes" are actually separate editors.   In LINE mode,  LSH has no way 
of finding out  where it is on the screen.   The only cursor movement commands
possible are backspace and advance by re-printing.   In FULL SCREEN mode,  the
current line appears one up from the bottom of the screen.   If you are at the 
end of the file, what has preceded will appear on screen.   Most  of  the full 
screen commands are available in line mode -  except queue functions and shell 
pause.]
 TEXT LINES   <ESC> T

   The number of text lines displayed may be set on-the-fly.  The installation
program also lets you set the default number.   4-5 lines is usually enough to
show where you are in the log file and  what is coming.   The display  is also
crisper when the  entire screen  doesn't  have  to be rewritten.   The minimum
setting is 1 line; the maximum is CRT lines less three.   For convenience, you
can  request  some large number like 99,  and LSH  will  set the maximum lines
available.

   In LINE mode,  this function  has  no meaning.   LSH uses  the same control
sequence to toggle display of the system time on the prompt line.
 SHELL PAUSE   <ESC><CR>

   In screen mode,  you may want LSH to pause before putting up its display to
give you time  to inspect console  output  from  the last command before it is
overwritten.  You can force a shell pause by executing the line with 
<ESC><CR>.

   LSH can also be installed  to pause automatically.   If the text  window is
only  a few  lines in  size,  there is  generally room  below  the display for 
console output.   LSH clears the lower part of the screen, leaving the command
lines showing.   When there are many lines  in the text window,  it makes more
sense to  clear the screen on command execution,  let the command run,  pause,
clear the screen  again,  and  redisplay  the command lines.   You can set the
decision point.   The default setting is 10 lines.   If you put it to 0 lines,
LSH will always do  a shell pause.   If you set  it to 99 lines, the automatic
pause function is disabled.
 SAVE   ESC S

   None of the usual ^KX, ^KS, ^KD, ^KL, functions are implemented.  LSH has a
recording toggle instead.  When ON, all changes made are saved to disk.   When 
OFF, any changes to the file are temporary and are lost between invocations.
 OLD LINE   ^O

   A ^O will search for a match to the current line up to the cursor position.
Press ^O again to continue the search.  To reverse the search direction, press
ESC O.  Default is backward.

    If you are at  the  start  of  a  line,  blank  or not,  you can type some  
characters, then search.   If a match is found,  the characters you just typed 
are NOT saved.
 LINE SEQUENCE   ^L

   LSH ordinarily comes up  on  a  blank line  at the end  of the log.  Before 
running  a command line,  it  stores a pointer to the current line.   When LSH 
runs again, it increments that pointer  to the NEXT line.   To go right to it, 
press ^L.  ESC L toggles  an automatic ^L on entry to the editor.   The effect
of auto line sequencing is to present the log line by line, "replaying" it.

   Single-line and full-screen modes use independent auto sequence flags.  The
default is auto ON for full-screen, auto OFF for single-line.

   [If the log has been changed with the SAVE state off or with an independent
editor, the pointer may not give you the line you expected.]
 PLACE MARKER   ^QZ, ^QP, ^QQ 

   An  unlimited number of line markers  may  be  set.   They  are  maintained 
between invocations of LSH.  ^QZ sets a marker to the current line.   ^QP goes
to the next marker, wrapping to  the beginning  of the text.   ^QQ clears them 
all.

   [In order to guarantee that the markers stay with the right  line when text
is added or deleted,  it was necessary to set the high bit of the character at
the start  of the line,  rather than using pointers.    That can cause trouble 
when a text editor which sets high  bits for its  own purposes is  used on the
history file.  The clear command will reset all high bits in the file.]
 UNDO   ^KU

   While  a line is being edited,  it is held in a line buffer.   UNDO cancels
any changes to the current line by reloading the line buffer from the  body of
the text.  Once you move off the line or delete it,  the line buffer is loaded 
back into the text and UNDO has no effect.   A deleted line  can  be recovered 
from the kill buffer.  See UNKILL. 
 UNKILL   ^U

   A line deletion or delete to end of line  saves the text to  a kill buffer.
The buffer's contents may be entered  at  the cursor  with ^U.   This function
may immediately  recover from  an accidental deletion,  or can be used to move 
deleted text somewhere else.   Note that the  buffer  is entered  on  the line
according to the setting of the insert/overwrite toggle.
 CONTROL CHAR   ^P

   A control character can  be inserted with the ^P trigger.   CAUTION - since 
^Z is the end of file marker for text files, you truncate the log by inserting
it.  (Use ECHO ^Z.)   You can insert a tab with ^PI,  but if you are editing a 
file with a lot of tabs in it, you'll want to install the TAB key to do tabs.

   The SCREEN mode display expands tabs.   LINE mode shows  them  as character
"I".
 HELP   ESC J

    It is helpful to see  a reminder of LSH's features,  but  I didn't want to 
add another 1k or so to the program for  a help  screen.   My solution  was to 
write a separate program,  HELPLSH.COM,  which will look for LSH in memory and  
display a screen showing the current command key set.  To make it easy to call
it from within LSH, the ESC J command was created to run a preset command line
-- HELPLSH.   Be sure  that HELPLSH.COM  is somewhere on  the path so that the
command processor can find it.   When (or if) you  don't want the help screen, 
you  can install  some other command line  to  be run  by this function.   One
possibility would be  an ARUNZ alias which could  easily be changed as desired
without reinstalling the command line in LSH.
:M
 MOVING TEXT 

        ^B  - Keep line to queue, advance to next.
        ^KK - Keep and Kill line, advance to next.
        ^KV - Insert queue contents, then clear the queue.
        ^KI - Insert queue at current line.
        ^KY - Clear the queue.

   LSH uses  a queue rather than  block functions.   A queue  picks up command 
lines as you mark them,  then deposits them  where you like.  (First in, first
out.)  That is just what we are most likely to do in this application.  If you
have  ever suffered  the tedium  of re-ordering  a list with  the  usual block 
functions, you will appreciate an alternate  way to  do it.  (Or, if you don't 
appreciate it, the log file is available to your text editor.)

   Note  that ^KK  adds the line  to  the queue  then deletes it,  leaving the 
cursor at the start of the next line.   Sitting on  the ^K key sucks lines up.
Do not use ^KB and ^KK as a pair.  [Generally, I have been using several ^KK's
and later a ^KV to unload the queue.]
 TOKEN REPEAT - 1/2   TAB n

   There are two "advanced features"  for  moving  text  which  use  the  kill 
buffer.  

1) Token repeat saves the  token # (1 - 9) you  have selected into the buffer, 
then enters it  at the  cursor.   The idea is  to save typing.   While playing
with this command, you can cancel any mistakes with UNDO.

        Example:  vde myprogam.z80;z80asm TAB2;TAB2

generates the line:

                  vde myprogram.z80;z80asm myprogram;myprogram

Since token repeat uses the kill buffer,  the second TAB2 in the example could
just as well have been ^U.
 TOKEN REPEAT - 2/2 


2) TAB TAB yanks  the  current  line from  the  cursor position into the  kill
buffer.  It loads the buffer with the  same  text  which delete-to-end-of-line
would delete.   The buffer contents can be entered later with  an UNKILL (^U).
This can  be  used to  store  a string you intend  to  use  several times when
building a series of command lines.