home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / ZSUS / Z3HELP-3.LBR / L.LBR / LSH.HZP / LSH.HLP
Text File  |  2000-06-30  |  22KB  |  425 lines

  1. ;
  2.                                     LSH.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5. LSH10.3OM      6k (48)   B73E  1.0q       Rob Friefeld 10/89       Z3COM5
  6. LSH10.4OM      7k (56)   F08C  1.0q       Rob Friefeld 10/89       Z3COM5
  7.  
  8.   1- Usage  2- Commands  3- Configuration  4- Error Messages  5- Notes        
  9.  
  10.    Log SHell is  a screen oriented command line editing shell.   Its interface
  11. may  be toggled between  a normal  blank line  with system prompt  and  a full 
  12. screen text editor.  Command lines are saved in an ordinary text file, limited
  13. in size by disk capacity.  On callup, LSH reads the named log into the editor,
  14. and the user  can then  enter new command lines  or move among ones already in 
  15. the log.   On  a carriage return, LSH loads the current line into the multiple
  16. command line buffer and returns to ZCPR 3.3.
  17.  
  18.    LSHINST.COM  installs  the  program  defaults  and  control  key  bindings.
  19. HELPLSH.COM displays a help screen when run from LSH.
  20. :1
  21.  
  22.    Syntax   LSH [logfile]
  23.  
  24.    Install LSH shell using the log  file specified.   The default type is CMD.
  25. If no DIR is specified,  the file is searched for in the  current DIR, then in
  26. LSH's  DIR.   If the file is  not  found,  and  no  DIR  is named, the file is
  27. created in LSH's DIR.  If no log  file is  specified,  LSH.CMD is the default.
  28. [The default name is LSH's current name.   If you rename the program to X.COM,
  29. the default log file becomes X.CMD.]
  30.  
  31.    As LSH is distributed,  you can't load a log file with a blank type because 
  32. LSH will look for a file with the default type.   If that is a problem, change 
  33. the default type to blanks.  Examples:
  34.  
  35.      LSH                 Start LSH with LSH.CMD.
  36.      LSH WORK            Use WORK.CMD in current DIR if it exists,
  37.                          else use or create it in LSH's DIR.
  38.      LSH FOO:WORK        Use or create WORK.CMD in FOO: directory.
  39.      LSH FOO:MY.LOG      Open specific file type.
  40.  
  41. :
  42.                       >>> LSH 1.0q CONTROL LIST <<<
  43.  
  44.   ESC  LEAD-IN KEY #1         Z  Last Screen            ^KY  Clear Q         
  45.     K  LEAD-IN KEY #2         G  Delete Char             ^B  Duplicate Line  
  46.     Q  LEAD-IN KEY #3       DEL  Delete Left              O  Old Line Search 
  47.     P  LEAD-IN KEY #4         T  Delete Word Rt       ESC O  Toggle Direction
  48.    CR  ENTRY KEY              -  Delete Word Lt           L  Recall Next Line
  49.     H  Backspace              Y  Delete Line          ESC L  Auto Line Recall
  50.     S  Char Left            ^QY  Delete to EOL        ESC S  Toggle Save     
  51.     D  Char Right             -  Carriage Return      ESC Q  Quit Shell      
  52.     E  Line Up                N  New Line             ESC [  Toggle Mode     
  53.     X  Line Down              V  Insert/Overwrite     ESC C  Warm Boot       
  54.     F  Word Right             U  Undelete             ESC M  Shell Pause     
  55.     A  Word Left            ^QU  Unchange Line        ESC T  Text Lines/ Time
  56.     J  Line End/ Start        -  Control Key            TAB  Repeat Token #  
  57.   ^QD  Line End             ^KZ  Clear to EOF           ^PZ  Set Place Mark  
  58.   ^QS  Line Start           ^KB  Yank Line to Q         ^QZ  Go To Next Mark 
  59.     R  Up Screen            ^KK  Yank & Kill Line       ^KH  Clear Markers   
  60.     C  Down Screen          ^KV  Insert Q & Clear     ESC J  HELP (Run Cmd)   
  61.     W  First Screen         ^KI  Insert Q        
  62. :2
  63.                               COMMAND SUMMARY 
  64.  
  65.    The commands which follow are installed with LSHINST.  Run the installation
  66. program to  see  the  current  control  key set.   (The default  is similar to 
  67. WordStar.)  Commands marked with "*" are ignored in  single-line mode.   Those
  68. with "-" are not installed.
  69.  
  70.  SHIFT KEYS 
  71.  
  72. All of the   editor  control keys  are  single bytes.  The number of available
  73. functions is expanded by  using  leadin  keys  to  trigger  a search for those 
  74. command characters with some of their  high bits set (handled automatically by
  75. the installation program).  Four lead-in keys are available.
  76.  
  77. Usage is: <lead-in key> <shifted key>.  Example:  ^KQ (or ^K^Q).
  78.  
  79. Lead-in key #1         (ESC)
  80. Lead-in key #2         (^K)
  81. Lead-in key #3         (^Q)
  82. Lead-in key #4         
  83.  EDITING FUNCTIONS - 1/2 
  84.  
  85. Entry key        CR  Command execution key
  86. Backspace       BSP  Non-destructive
  87. Char left        ^S  Same as backspace
  88. Char right       ^D
  89. Line up          ^E  Go to start of previous line
  90. Line down        ^X  Go to start of next line
  91. Word right       ^F  (Word separator characters may be installed)
  92. Word left        ^A
  93. Line end/ start  ^J  First to line end.  If there, to start
  94. Line start      ^QS
  95. Line end        ^QD
  96. Up screen *      ^R  First to top of screen, then previous screen
  97. Down screen *    ^C  First to bottom of screen, then next screen
  98. First screen     ^W  Top of file
  99. Last  screen     ^Z  End of file.  (Quickest way to append to log)
  100.  EDITING FUNCTIONS - 2/2 
  101.  
  102. Delete char      ^G  At cursor
  103. Delete left     DEL  Destructive backspace
  104. Delete word rt   ^T
  105. Delete line      ^Y  Deleted line saved to kill buffer
  106. Delete to EOL   ^QY  Saved to kill buffer.  UNKILL recovers.     
  107. Carriage rtn      -  Usually preempted by the ENTRY key
  108. New line         ^N  Same as <cr> in INSERT mode
  109. Insert/overwr    ^V  Toggle text insertion mode
  110. Dupicate line    ^B  Duplicate current line
  111. Undelete         ^U  Recover text deleted with DELEOL or DELLINE
  112. Unchange line   ^QU  Restart current line (doesn't work after DELLINE)
  113. Control key      ^P  Trigger for control key insertion
  114. Clear to EOF    ^KZ  Zap everything from cursor to end of file
  115. TAB               -  Insert a tab
  116.  QUEUE FUNCTIONS   (* None are available in single-line mode)
  117.  
  118. Use the queue to re-organize the history file by  picking up lines one  by one
  119. in the order you want them, then unloading the queue.
  120.  
  121. Keep and kill   ^KK  Save line, delete it, advance to next
  122. Insert Q        ^KI  Insert queue contents at line
  123. Insert & clr    ^KV  Insert queue, then clear it
  124. Clear Q         ^KY
  125.  SPECIAL FUNCTIONS 
  126.  
  127. Old line srch    ^O  Look for match to current line up to cursor
  128. Search dir    ESC O  Toggle search direction forward or backward
  129. Line sequence    ^L  Go to line after one last executed
  130. Auto seg      ESC L  Automatic return to next line on reentry
  131. Toggle save   ESC S  Recording on/off
  132. Quit shell    ESC Q  Finished with LSH
  133. Mode        ESC ESC  Full-screen mode / single-line mode
  134. Warm boot     ESC C  Do warm boot if at beginning of line
  135. Pause *      ESC CR  Shell pause for key strike before reentry
  136. Text lines *  ESC T  Set # lines for SCREEN mode
  137. Time display   "     LINE mode, show time in system prompt
  138. Token         TAB #  Replicate, save tokens 1...9
  139. Mark place      ^QZ  Line markers are retained in log file
  140. Go to mark      ^QP  Any number may be set
  141. Clear markers   ^QQ  Deletes all place markers
  142. HELP          ESC J  Run preset command line - HELPLSH.COM
  143.  ENTRY KEY   <CR>
  144.  
  145.    The entry  key causes  the  current line  to execute  as  a  command.   For 
  146. editing purposes, a ^N will substitute for <CR>.   (It inserts  a <CR>  at the 
  147. cursor.)  If you want the <CR> available for editing,  you may install another
  148. control character as the entry key.  
  149.  SPECIAL FUNCTIONS   <ESC> 
  150.  
  151.         <ESC> Q - QUIT the shell
  152.           "   C - Warm boot  [ ^C not available ]
  153.           "  CR - Execute line with shell PAUSE.
  154.           "   S - Toggle SAVE on/off
  155.           "   T - Set number of TEXT lines. [ 1 .. screen size ]
  156.           "   L - Toggle LINE sequencing
  157.           " ESC - Toggle MODE of operation [full screen or line]
  158.           "   O - Toggle OLD string search direction
  159.           "   J - HELP screen
  160.  
  161.    Many functions have  no analog in a pure editor.   LSH requires commands to
  162. stop the shell,  initiate  a warm boot,  and pause  before shell execution (to 
  163. look at the screen before it is wiped out).   Most of these have been assigned 
  164. to the escape key.
  165.  SWITCH MODES   <ESC><ESC>
  166.  
  167.    LSH operates in two modes.   In LINE mode, LSH shows a system prompt pretty
  168. much as usual.   LSH's presence is  not that obvious until you make use of its
  169. editing features or recall old lines. 
  170.  
  171.    In SCREEN mode,  a  selectable number  of  command lines  appear in  a text 
  172. window at the top of the screen.   You have what amounts to  a menu of command 
  173. lines to choose from.  Move the cursor to a line, press <CR>, and it executes.
  174. Screen mode is handy for editing, reaaranging, or just viewing the log file.
  175.  
  176.    [The "modes" are actually separate editors.   In LINE mode,  LSH has no way 
  177. of finding out  where it is on the screen.   The only cursor movement commands
  178. possible are backspace and advance by re-printing.   In FULL SCREEN mode,  the
  179. current line appears one up from the bottom of the screen.   If you are at the 
  180. end of the file, what has preceded will appear on screen.   Most  of  the full 
  181. screen commands are available in line mode -  except queue functions and shell 
  182. pause.]
  183.  TEXT LINES   <ESC> T
  184.  
  185.    The number of text lines displayed may be set on-the-fly.  The installation
  186. program also lets you set the default number.   4-5 lines is usually enough to
  187. show where you are in the log file and  what is coming.   The display  is also
  188. crisper when the  entire screen  doesn't  have  to be rewritten.   The minimum
  189. setting is 1 line; the maximum is CRT lines less three.   For convenience, you
  190. can  request  some large number like 99,  and LSH  will  set the maximum lines
  191. available.
  192.  
  193.    In LINE mode,  this function  has  no meaning.   LSH uses  the same control
  194. sequence to toggle display of the system time on the prompt line.
  195.  SHELL PAUSE   <ESC><CR>
  196.  
  197.    In screen mode,  you may want LSH to pause before putting up its display to
  198. give you time  to inspect console  output  from  the last command before it is
  199. overwritten.  You can force a shell pause by executing the line with 
  200. <ESC><CR>.
  201.  
  202.    LSH can also be installed  to pause automatically.   If the text  window is
  203. only  a few  lines in  size,  there is  generally room  below  the display for 
  204. console output.   LSH clears the lower part of the screen, leaving the command
  205. lines showing.   When there are many lines  in the text window,  it makes more
  206. sense to  clear the screen on command execution,  let the command run,  pause,
  207. clear the screen  again,  and  redisplay  the command lines.   You can set the
  208. decision point.   The default setting is 10 lines.   If you put it to 0 lines,
  209. LSH will always do  a shell pause.   If you set  it to 99 lines, the automatic
  210. pause function is disabled.
  211.  SAVE   ESC S
  212.  
  213.    None of the usual ^KX, ^KS, ^KD, ^KL, functions are implemented.  LSH has a
  214. recording toggle instead.  When ON, all changes made are saved to disk.   When 
  215. OFF, any changes to the file are temporary and are lost between invocations.
  216.  OLD LINE   ^O
  217.  
  218.    A ^O will search for a match to the current line up to the cursor position.
  219. Press ^O again to continue the search.  To reverse the search direction, press
  220. ESC O.  Default is backward.
  221.  
  222.     If you are at  the  start  of  a  line,  blank  or not,  you can type some  
  223. characters, then search.   If a match is found,  the characters you just typed 
  224. are NOT saved.
  225.  LINE SEQUENCE   ^L
  226.  
  227.    LSH ordinarily comes up  on  a  blank line  at the end  of the log.  Before 
  228. running  a command line,  it  stores a pointer to the current line.   When LSH 
  229. runs again, it increments that pointer  to the NEXT line.   To go right to it, 
  230. press ^L.  ESC L toggles  an automatic ^L on entry to the editor.   The effect
  231. of auto line sequencing is to present the log line by line, "replaying" it.
  232.  
  233.    Single-line and full-screen modes use independent auto sequence flags.  The
  234. default is auto ON for full-screen, auto OFF for single-line.
  235.  
  236.    [If the log has been changed with the SAVE state off or with an independent
  237. editor, the pointer may not give you the line you expected.]
  238.  PLACE MARKER   ^QZ, ^QP, ^QQ 
  239.  
  240.    An  unlimited number of line markers  may  be  set.   They  are  maintained 
  241. between invocations of LSH.  ^QZ sets a marker to the current line.   ^QP goes
  242. to the next marker, wrapping to  the beginning  of the text.   ^QQ clears them 
  243. all.
  244.  
  245.    [In order to guarantee that the markers stay with the right  line when text
  246. is added or deleted,  it was necessary to set the high bit of the character at
  247. the start  of the line,  rather than using pointers.    That can cause trouble 
  248. when a text editor which sets high  bits for its  own purposes is  used on the
  249. history file.  The clear command will reset all high bits in the file.]
  250.  UNDO   ^KU
  251.  
  252.    While  a line is being edited,  it is held in a line buffer.   UNDO cancels
  253. any changes to the current line by reloading the line buffer from the  body of
  254. the text.  Once you move off the line or delete it,  the line buffer is loaded 
  255. back into the text and UNDO has no effect.   A deleted line  can  be recovered 
  256. from the kill buffer.  See UNKILL. 
  257.  UNKILL   ^U
  258.  
  259.    A line deletion or delete to end of line  saves the text to  a kill buffer.
  260. The buffer's contents may be entered  at  the cursor  with ^U.   This function
  261. may immediately  recover from  an accidental deletion,  or can be used to move 
  262. deleted text somewhere else.   Note that the  buffer  is entered  on  the line
  263. according to the setting of the insert/overwrite toggle.
  264.  CONTROL CHAR   ^P
  265.  
  266.    A control character can  be inserted with the ^P trigger.   CAUTION - since 
  267. ^Z is the end of file marker for text files, you truncate the log by inserting
  268. it.  (Use ECHO ^Z.)   You can insert a tab with ^PI,  but if you are editing a 
  269. file with a lot of tabs in it, you'll want to install the TAB key to do tabs.
  270.  
  271.    The SCREEN mode display expands tabs.   LINE mode shows  them  as character
  272. "I".
  273.  HELP   ESC J
  274.  
  275.     It is helpful to see  a reminder of LSH's features,  but  I didn't want to 
  276. add another 1k or so to the program for  a help  screen.   My solution  was to 
  277. write a separate program,  HELPLSH.COM,  which will look for LSH in memory and  
  278. display a screen showing the current command key set.  To make it easy to call
  279. it from within LSH, the ESC J command was created to run a preset command line
  280. -- HELPLSH.   Be sure  that HELPLSH.COM  is somewhere on  the path so that the
  281. command processor can find it.   When (or if) you  don't want the help screen, 
  282. you  can install  some other command line  to  be run  by this function.   One
  283. possibility would be  an ARUNZ alias which could  easily be changed as desired
  284. without reinstalling the command line in LSH.
  285.  MOVING TEXT 
  286.  
  287.         ^B  - Keep line to queue, advance to next.
  288.         ^KK - Keep and Kill line, advance to next.
  289.         ^KV - Insert queue contents, then clear the queue.
  290.         ^KI - Insert queue at current line.
  291.         ^KY - Clear the queue.
  292.  
  293.    LSH uses  a queue rather than  block functions.   A queue  picks up command 
  294. lines as you mark them,  then deposits them  where you like.  (First in, first
  295. out.)  That is just what we are most likely to do in this application.  If you
  296. have  ever suffered  the tedium  of re-ordering  a list with  the  usual block 
  297. functions, you will appreciate an alternate  way to  do it.  (Or, if you don't 
  298. appreciate it, the log file is available to your text editor.)
  299.  
  300.    Note  that ^KK  adds the line  to  the queue  then deletes it,  leaving the 
  301. cursor at the start of the next line.   Sitting on  the ^K key sucks lines up.
  302. Do not use ^KB and ^KK as a pair.  [Generally, I have been using several ^KK's
  303. and later a ^KV to unload the queue.]
  304.  TOKEN REPEAT - 1/2   TAB n
  305.  
  306.    There are two "advanced features"  for  moving  text  which  use  the  kill 
  307. buffer.  
  308.  
  309. 1) Token repeat saves the  token # (1 - 9) you  have selected into the buffer, 
  310. then enters it  at the  cursor.   The idea is  to save typing.   While playing
  311. with this command, you can cancel any mistakes with UNDO.
  312.  
  313.         Example:  vde myprogam.z80;z80asm TAB2;TAB2
  314.  
  315. generates the line:
  316.  
  317.                   vde myprogram.z80;z80asm myprogram;myprogram
  318.  
  319. Since token repeat uses the kill buffer,  the second TAB2 in the example could
  320. just as well have been ^U.
  321.  TOKEN REPEAT - 2/2 
  322.  
  323.  
  324. 2) TAB TAB yanks  the  current  line from  the  cursor position  into the kill
  325. buffer.  It loads the buffer with the  same  text  which delete-to-end-of-line
  326. would delete.   The buffer contents can be entered later with  an UNKILL (^U).
  327. This canb  be  used to store  a string you intend  to  use  several times when 
  328. building a series of command lines.
  329. :3
  330.  Configuration 
  331.  
  332.    Initial states of the toggles, default log file type,  prompt delay, number
  333. of records of the log  to read,  initial text lines,  and entry key can be set
  334. with  LSHINST.COM  or ZCNFG 1.3 (by A. E. Hawley)  and  LSH.CFG.   A  terminal
  335. specific  "clear to end of screen" string  may  also be installed  if desired.
  336. The editor control key bindings can only be installed with LSHINST.
  337. :4
  338.  Error Messages 
  339.  
  340. "LOG  OVFL"  -  There is not  enough  TPA  to  hold  the log file.   Solution:
  341.                 change the default READ RECS to something smaller.  If the TPA
  342.                 is  nearly  full  and  you  enter  a lot  of  text,  LSH  will 
  343.                 eventually stop accepting input.
  344.  
  345. "STACK FULL" -  The shell stack is either non-existent or full.  In the latter
  346.                 case, pop something off the stack, then try again.
  347.  
  348. "NAME?"      -  The log file specification must be unambiguous.
  349.  
  350. "TCAP?"      -  The editor  couldn't  find  needed support in your TCAP entry.  
  351.                 Are you sure it is loaded?
  352.  
  353.    [One condition that LSH does NOT complain about is a text line that is not 
  354. a command line:  comments, titles, etc.  To insure that the command processor 
  355. doesn't try to run them, start them with ";" or with NOTE.]  
  356. :5
  357.  LSH Notes - 1/4 
  358.  
  359.    a. System Requirements:
  360.  
  361.       ZCPR 3.3 with external FCB,  shell stack,  TCAP.  Shell stack entry must 
  362.       be at least 32 bytes (standard).   Performance with a hard disk is good, 
  363.       with a RAM disk is excellent.
  364.  
  365.       [ In addition to its own name,  LSH uses the stack entry to keep part of
  366.       the fcb for its log file,  a save  to disk flag,  a command pointer, the
  367.       number of text lines to display,  the insert/overwrite toggle,  a string
  368.       search direction flag,  the current mode (screen oriented or line),  and
  369.       the command execution key.  When another shell is run on top, the entire
  370.       entry must be  pushed down in  the shell stack,  then moved up  when the
  371.       application is popped.  As far as I know,  all programs which use SYSLIB
  372.       will do this.  I have only tested it with ZFILER and EASE. ]
  373.  LSH Notes - 2/4 
  374.  
  375.    b. Security:  The only  built-in  security  feature is  a check of the DUOK 
  376.       flag  for  system  prompts.   Wheel  status  is  not  required.   [Those 
  377.       concerned with system security should  configure  the command  processor 
  378.       accordingly.]
  379.  
  380.    c. The editor  is intended to be comfortable to use for those familiar with 
  381.       VDE  or WordStar.   There  are  several  minor  differences  in  control 
  382.       function  from VDE which will become immediately evident.   Mostly,  the 
  383.       variations save  key strokes  and/or code.   The LSH  editor puts cursor 
  384.       mobility ahead of text alteration.  
  385.  LSH Notes - 3/4  
  386.  
  387.    d. Vs 1.0n improvements:
  388.       -- tab expansion code eliminated from screen editor
  389.       -- 4 lead-in keys now available
  390.       -- on switching from LINE mode to SCREEN mode,  current line appears one
  391.          up from bottom of screen rather than one down from top 
  392.       -- the prompt upper/lower case reflects the current task under BGII
  393.       -- a flag may be set to disable deletion of cr/lf pairs in LINE mode
  394.       -- line markers are now reverse-searched
  395.       -- LSHINST is more menu-oriented; manual install of CLREOS eliminated
  396.       -- HELPLSH now works with BGII running
  397.  
  398.    e. Vs. 1.0o improvements:
  399.       -- Vs 1.0n lost track of its line pointer when memory size  was altered,
  400.          e.g., due to RSX's coming and going.   Now uses a pointer relative to
  401.          program location.  This affects line/recall sequencing commands.
  402.       -- Fixed bug in line mode editor (mixup of ^QS and ^QD commands)
  403.       -- Added  "delete word left" command  (disabled in  distributed version
  404.          since there are no free single letter command keys)
  405.       -- modified to work with Bridger Mitchell's scheduler AT
  406.  LSH Notes - 4/4 
  407.  
  408.    f. Vs. 1.0p improvements:
  409.       -- Console I/O via BDOS rather than BIOS
  410.       -- Bug in marker deletion routine fixed
  411.       -- In screen mode, with auto line sequencing ON, cursor now appears near
  412.          bottom of screen to give  emphasis to command lines  already executed
  413.          rather than those coming up.
  414.  
  415.    g. Vs. 1.0q improvements:
  416.       -- backspace is now destructive (same as delete key)
  417.       -- new time display routines, with installable option  to  show  time in 
  418.          standout video mode.  Shortened display format.
  419.       -- Queue commands implemented for LINE mode.
  420.       -- new command:  duplicate line (^B),  which  copies  current  line  for
  421.          modification and re-use.   LSHINST sets flag to allow this command to
  422.          automatically substitute "GO" for the first token on the line.
  423.       -- LINE mode echoes  a CR to show that something has happened  while LSH 
  424.          is busy updating the history file.
  425.       -- numerous bug fixes