home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / HILFEN / SYSTEM / STACK / STACK.DOC < prev    next >
Text File  |  1993-12-01  |  24KB  |  581 lines

  1.      STACK - Command Line Editor/Enhancer, Version 2.4
  2.      =================================================
  3.  
  4. ACKNOWLEDGEMENTS
  5. ----------------
  6.  
  7. I thought that it was about time I gave credit to some of those 
  8. users whose suggestions have improved STACK or helped me isolate 
  9. faults.
  10.  
  11. Barry Foelsch of Raleigh, NC who helped me track down a problem 
  12. with mono displays.
  13.  
  14. All the members of the Canberra C SIG whose many suggestions 
  15. resulted in version 2.0
  16.  
  17. Jeff Bowles of Columbus, Ohio who helped isolate the repeated 
  18. command fault in version 2.3 and suggested the F3 option.
  19.  
  20.  
  21. AUTHOR'S RAMBLINGS
  22. ------------------
  23.  
  24. Isn't it always the way ?  You just finish setting up a new bit of
  25. software and out comes an upgrade.  However you shouldn't find
  26. updating to version 2.4 a traumatic experience as it is completely
  27. compatible with versions later than 2.0 and all of the new features
  28. are initially disabled.  Unfortunately I wasn't able to keep the
  29. command file to the same size as for 2.0 and it has grown by about 200
  30. bytes.  Still I think the size increase is worth the benefits.  (For
  31. those who are wondering what happened to 2.1 it had a minor bug which
  32. was quickly discovered but not until after I had distributed a few
  33. copies.)
  34.  
  35. The down side of all this is that STACK is now becoming fairly
  36. complex.  To combat this I have presented the commands available in
  37. two sections and new users may find it simpler just to use the basic
  38. commands initially and only use the more esoteric commands when they
  39. find they need them.
  40.  
  41. All of the new features have been included in the documentation and
  42. are summarized in the file HISTORY.STK
  43.  
  44.  
  45.  
  46.  
  47. WHAT IS IT ?
  48. ------------
  49.  
  50. There are a number of programs around that record the last few
  51. commands that were typed in a stack and allow you to recall them
  52. with a few key strokes.  I've always used one and feel a bit lost
  53. on a computer that doesn't have one.  The problem that I have
  54. with such utilities is that the stack quickly gets cluttered up
  55. with a 'rubbish' commands that I don't want to use again and I
  56. loose track of whether the command I want is still in the stack
  57. or has been pushed out.
  58.  
  59. STACK is my solution to this problem.  In addition to the usual
  60. command line editing features STACK allows you to flip open a
  61. window showing you what commands are in the stack.  You can also
  62. copy these commands to a separate list associated with the
  63. function keys.
  64.  
  65.  
  66. FOR USERS OF EARLIER VERSIONS
  67. -----------------------------
  68.  
  69. Users of version 1.x of STACK will notice a few changes,
  70. hopefully all for the better and none too traumatic.  The main
  71. changes are:
  72.  
  73. -  the command to modify STACK.COM is now ALT-W
  74.  
  75. -  the function key list now uses a select bar similar to the
  76.    command stack
  77.  
  78. -  the command stack is not cleared when STACK is loaded so it is
  79.    possible to save commands in the stack as well as the
  80.    function key list
  81.  
  82. -  new commands are always added to the bottom of the stack (as
  83.    displayed on the screen) with old commands dropping off the
  84.    top.
  85.  
  86. -  commands that are already in the command stack or function key
  87.    definitions will not be copied into the command stack.
  88.  
  89. There are some other minor differences but these can be changed
  90. with the setup utility.
  91.  
  92.  
  93. COMPATIBILITY WITH OTHER UTILITIES
  94. ----------------------------------
  95.  
  96. STACK patches some DOS interrupts and can clash with other
  97. resident utilities especially keyboard enhancers such as
  98. SMARTKEY.  If you load it before such utilities there shouldn't
  99. be any problem.
  100.  
  101. Some users have asked if it is possible to make STACK work within
  102. utilities such as XTREE that "shell" to DOS to let you execute
  103. commands.  The answer is a qualified sometimes.  Many of these
  104. programs don't actually shell to DOS but instead use their own
  105. code to collect a command string from you then get DOS to execute
  106. the command directly.  In these situations STACK doesn't get a
  107. look in and there is usually no way around it however setting the
  108. always enabled flag in STACK may work in some cases.
  109.  
  110.  
  111. COPYWRITE, ETC
  112. --------------
  113.  
  114. STACK (all versions) may not be sold for profit or "bundled" with
  115. other products without my permission.   Other than that there are
  116. no restrictions on who can use STACK or under what conditions.
  117. Go for it.
  118.  
  119.  
  120. COMMANDS - GENERAL
  121. ------------------
  122.  
  123. The commands recognized by STACK are presented in two groups, the
  124. common commands, which are essentially those compatible with
  125. earlier versions of stack, and the less common commands.  A
  126. summary of all commands is presented afterwards.
  127.  
  128. POSITION OF COMMAND LINE.  So that long command lines do not
  129. interfere with the window display STACK will automatically move
  130. the command line to the bottom of the screen if it might get in
  131. the road of an opening window.
  132.  
  133. TERMINOLOGY.  When a window is opened the highlighted line is
  134. referred to as the current command.  Except where otherwise
  135. indicated all commands affect or action the current command.
  136.  
  137. Where the command descriptions below refer to a command in the
  138. stack the details are equally applicable to function key
  139. definitions in the function key list, except where noted.
  140.  
  141.  
  142. COMMON (OLD) COMMANDS
  143. ---------------------
  144.  
  145. Return/Enter - execute the current command
  146.  
  147. UP       - select the preceding command and display it at the
  148. (arrow)    DOS prompt.  If a window is open the select bar is
  149.            moved to the previous command.  In 1.x versions of
  150.            STACK the up arrow recalled the command prior to the
  151.            last command rather than the last command.  Some users
  152.            found this useful and you can select between the two
  153.            alternatives using the setup utility.
  154.  
  155. F3       - using the setup utility F3 can be made to act the same 
  156.            the UP key.  If this option is selected then you can 
  157.            still invoke the F3 function from the function key 
  158.            list using the highlight.  To act as a reminder when 
  159.            F3 is switched to act as the UP key the 'F3' label is 
  160.            blanked out in the function key window.
  161.  
  162. DOWN     - select the next command and display it at the
  163. (arrow)    DOS prompt.  If a window is open the select bar is
  164.            moved to the next command.
  165.  
  166. PGUP     - open a window and display the command stack.
  167.  
  168. PGDN     - open a window and display the function key definitions
  169.            for the function key list.
  170.  
  171. HOME     - move the cursor to the left of the current command
  172.  
  173. END      - move the cursor to the right of the current command
  174.  
  175. DEL      - delete the character at the cursor
  176.  
  177. INS      - toggle insert mode.  Insert on is indicated by a block
  178.            shaped cursor.  The default insert state can be set
  179.            using the setup utility.
  180.  
  181. Backspace -delete the character to the left of the cursor
  182.  
  183. ESC      - clear the command line and close the window
  184.  
  185. TAB      - delete the currently highlighted command from the stack
  186.  
  187. Fn       - copy the command associated with that function key
  188. shift Fn   to the command line and execute it if the definition
  189.            is terminated with a carriage return (see next
  190.            command).  You can also issue the command associated
  191.            with a function key switching to the function key
  192.            window (PGDN) and selecting it with the highlight bar
  193.            and then pressing Return/Enter. The function keys that
  194.            can be programmed in this way are F1 to F10 and shift
  195.            F1 to shift F5.  See the note on F3 above.
  196.  
  197. Ctrl Fn  - copy the current command to this function key.  Ctrl F1
  198. Alt Fn     to ctrl F10 copy to the corresponding function key,
  199.            alt F1 to alt F5 copy to shift F1 to shift F5
  200.            respectively.  If STACK is currently in insert mode (ie.
  201.            you pressed INS and the block cursor is showing) then NO
  202.            carriage return is added to the end.  This means that you
  203.            can add some more to the end before pressing Return/Enter.
  204.            If insert mode if off then a carriage return is added to
  205.            the end and the command will be executed as soon as you
  206.            press the function key.
  207.  
  208. Alt w    - modify STACK.COM by writing the current (ie. in memory)
  209.            command stack and function key definitions to
  210.            STACK.COM.  The memory copy of STACK expects STACK.COM
  211.            to be located in the current drive and directory, if
  212.            it isn't you'll get an error message on the command
  213.            line which can be cleared by pressing ESC.  Note that
  214.            the current contents of command stack is also written
  215.            out.
  216.  
  217. ^        - can be used to concatenate several commands on one
  218.            line, eg.   cd \ws^ws^cd \
  219.            (this can be used to replace small batch files).  This
  220.            character can be changed using the setup utility.
  221.  
  222.  
  223. LESS COMMON (NEW) COMMANDS
  224. --------------------------
  225.  
  226. Ctrl LEFT - move left one word in the current command
  227.  
  228. Ctrl RIGHT - move RIGHT one word in the current command
  229.  
  230. Ctrl t   - delete from the cursor to the end of the current word
  231.            (taken to be the next non-alphabetic character)
  232.  
  233. Ctrl END - delete from the cursor to the end of the current
  234.            command
  235.  
  236. Ctrl HOME - delete from the cursor to the start of the current
  237.            command
  238.  
  239. Right Shift RETURN - copy the current command line into the
  240.            highlighted position in the current stack (if no
  241.            window is displayed then the command stack is the
  242.            current one). This is mostly useful for modifying your
  243.            function key definitions.  You can select a function
  244.            key using the highlight bar, edit it as the current
  245.            command and then copy it back into the function key
  246.            stack without executing it.
  247.  
  248. Left Shift RETURN - copies the command line to the command stack
  249.            as if Return/Enter was pressed but the command is not
  250.            executed.  This is different from Right Shift Return
  251.            in that it copies the command to the bottom of the
  252.            command stack where as Shift Return copies the command
  253.            to the CURRENT position in the current stack (the
  254.            command stack OR the function key list).  I often find
  255.            that I have almost completed entering a command only
  256.            to realise that I need to issue another command before
  257.            it.  This command saves me some typing without having
  258.            to fiddle around concatenating the other command to
  259.            the start of the existing one.
  260.  
  261. Ctrl PGDN - toggle automatic displaying of the function key
  262.             window.  When toggled on the function key window will
  263.             be automatically displayed when DOS is waiting for a
  264.             command.  This, together with the label character
  265.             (see below), forms a basic menu system.  Why a menu
  266.             system ?  Well some of the other people who use my
  267.             computer don't know DOS and don't want to (sometimes
  268.             I don't blame them).  This provides them with a
  269.             simple interface without lumbering me with a big menu
  270.             system.  When automatic function key display is
  271.             toggled on the window will be opened immediately (or
  272.             replace the command stack window).  If automatic
  273.             display is toggled off the window will remain until
  274.             it is closed with ESC or Return but will not
  275.             automatically reappear.  This feature can also be
  276.             permanently turned on using the setup utility.  If
  277.             this all sounds confusing then just try it out.
  278.  
  279. Ctrl PGUP - toggles automatic displaying of the command stack
  280.             window similar to Ctrl PGDN for function keys.  This
  281.             can also be set to default to on using the setup
  282.             utility.  If both automatic displays are set on using
  283.             the setup program then the command stack window will
  284.             be displayed.
  285.  
  286. Ctrl w    - writes the current command stack and function key
  287.             definitions (only) to a nominated file.  The file name can
  288.             be set using the set up program or you can use the set up
  289.             program to indicate that the file name will be given on
  290.             the command line.  If the file name is given on the
  291.             command line then typing
  292.                     C:\>\dos\mystack.dat
  293.             at the dos prompt and pressing Ctrl w will create the file
  294.             MYSTACK.DAT in the indicated directory and write the
  295.             stacks to it.  Ctrl w created a small (2.5K) file separate
  296.             from STACK.COM and does not modify STACK.COM as does Alt
  297.             w.
  298.  
  299. Ctrl r   - reads a file created by Ctrl w into the command stack
  300.            and function key list.  The name of the file is given
  301.            as for Ctrl W and STACK expects to find the file in the
  302.            indicated directory.
  303.  
  304. Alt a    - toggles always enabled flag.  Normally STACK only
  305.            works at the DOS prompt but when you toggle it to be
  306.            always enabled it will work whenever a program
  307.            requests DOS to input a string.  Surprisingly few
  308.            programs use this function usually just other DOS
  309.            programs such as DEBUG and EDLIN.  You can also set
  310.            this flag permanently using the setup utility.
  311.  
  312. #        - indicates that all preceding characters were a label.
  313.            They will be displayed but will not be included in the
  314.            command to be executed.  This character can be changed
  315.            using the setup utility.
  316.  
  317. Search   - if STACKUP is used to set the search character (to either
  318.            the '+' key or the Shift-tab) you can recall a command
  319.            (from the command stack) by typing the first few letters
  320.            and pressing the search key.  The search can be repeated to
  321.            find the next command starting with the same characters,
  322.            ie. you don't have to re-enter the search characters (see
  323.            the example below).  The number of characters used in the
  324.            search can be set using the setup utility.
  325.  
  326.            Example: if the command stack contained the following
  327.            commands:
  328.                       cd \dos
  329.                       dir /w
  330.                       cd \
  331.  
  332.            and you entered "cd" then pressed the search key, the
  333.            following would appear at the command line:
  334.  
  335.                      cd \dos      (1st press)
  336.  
  337.            pressing the search key again would produce
  338.  
  339.                      cd \         (2nd press)
  340.                      cd \dos      (3rd press)
  341.  
  342.  
  343. COMMAND SUMMARY
  344. ---------------
  345.  
  346. Cursor movement
  347.  
  348. HOME          - move the cursor to the left of the current command
  349. END           - move the cursor to the right of the current command
  350. Ctrl LEFT     - move left one word in the current command
  351. Ctrl RIGHT    - move RIGHT one word in the current command
  352.  
  353.  
  354. Deleting
  355.  
  356. DEL           - delete the character at the cursor
  357. Backspace     - delete the character to the left of the cursor
  358. Ctrl t        - delete from the cursor to the end of the current word
  359. Ctrl END      - delete from the cursor to the end of the line
  360. Ctrl HOME     - delete from the cursor to the start of the line
  361.  
  362.  
  363. Window Control/Command Selection
  364.  
  365. TAB           - delete the highlighted command from the stack
  366. UP arrow      - select the preceding command
  367. DOWN arrow    - select the next command
  368. PGDN          - open the function key window
  369. PGUP          - open the command stack window
  370. Ctrl PGDN     - toggle automatic display of the function key
  371.                 window
  372. Ctrl PGUP     - toggles automatic display of the command stack
  373.                 window
  374. ESC           - clear the command line and close the window
  375. search        - finds a command based on first few letters
  376.  
  377.  
  378. File Functions
  379.  
  380. Alt w         - write command and function key stacks to STACK.COM
  381. Ctrl w        - writes the current command and function key
  382.                 stacks to the file named on the command line
  383. Ctrl r        - read the command stack and function key list from
  384.                 the file named on the command line
  385.  
  386.  
  387. Function Keys
  388.  
  389. Fn/shift Fn   - issue the command associated with that function key
  390. Ctrl/Alt Fn   - copy the current command to the function key
  391.  
  392.  
  393. Special Characters
  394.  
  395. ^             - concatenate several commands on one line
  396. #             - indicates that all preceding characters were a label
  397. search        - finds a command based on first few letters
  398.  
  399. Miscellaneous
  400.  
  401. Return/Enter        - execute the current command
  402. INS                 - toggle insert mode
  403. Right Shift RETURN  - copy the current command line into the
  404.                       highlighted position in the current stack
  405. Left Shift RETURN   - copies the command line to the command
  406.                       stack (same as Return/Enter but not executed)
  407.  
  408.  
  409. STACK SETUP UTILITY - STACKUP
  410. -----------------------------
  411.  
  412. STACKUP is a basic setup utility for customising your copy of
  413. STACK.  It is simple to use and the notes below are intended to
  414. describe what aspects of STACK it will change rather than how to
  415. use STACKUP.
  416.  
  417. Command Line
  418. ------------
  419. You may specify a full path and file name on the command line to tell
  420. STACKUP which copy of STACK to modify.  If you have renamed the .COM
  421. file then you will have to use STACKUP to modify the filename so that
  422. Alt-w will work correctly, eg
  423.  
  424.                STACKUP \DOS\UTIL\STK
  425.  
  426. will cause STACKUP to read/modify a file called STK.COM located in
  427. the directory \DOS\UTIL.
  428.  
  429. Some users have reported a problem with their screen display when
  430. using STACKUP, usually stray characters on the screen or strange
  431. positioning of input fields.  If this is a problem then you can try 
  432. running STACKUP with a "/v" option, ie.
  433.  
  434.                STACKUP /V
  435.  
  436. This causes STACKUP to use a different method of screen handling
  437. which should solve the problem.  I would be interested in hearing 
  438. from anyone who has the problem especially if /v doesn't fix it. 
  439. If you do write to me about this then please indicate what machine
  440. you have, its age, your version of DOS and the version of the BIOS
  441. your machine is using if you know it.
  442.  
  443. Colours
  444. -------
  445. Allows you to select the colours STACK uses for the window and
  446. highlight bar.
  447.  
  448. Options
  449. -------
  450. Sets various toggles and parameters:
  451.  
  452. SUPPRESS FLICKER DETECTION ON CGA DISPLAYS - some early model CGA
  453. displays flicker and display "snow" when a program writes
  454. directly to the screen.  STACK detects CGA displays and tries to
  455. suppress this flicker however this may not be necessary with your
  456. adapter.
  457.  
  458. WIDTH OF WINDOW - allows you to set the width of the window STACK
  459. will use.  The penalty of a larger window will be that STACK will
  460. occupy more memory when loaded.
  461.  
  462. TOP ROW FOR WINDOW - sets the top row where the window will be
  463. opened.
  464.  
  465. LEFT COLUMN FOR WINDOW - sets the left column where window will
  466. be opened.
  467.  
  468. SORT OPTION - Allows you to adjust the way STACK manipulates commands
  469. in the command stack:
  470.   No Sort - This is the default.  New commands are added at the end of
  471.      the command stack.  When the stack gets full the command at the
  472.      top of the stack is pushed off.
  473.   Move Forward - when a command is executed it is moved forward to the
  474.      end of the command stack.  When the stack gets full the command
  475.      at the top of the stack is pushed off. The effect of this is that
  476.      the most used commands drift towards the end of the command stack
  477.      and the others fall of the top.
  478.   Delete Least Used - commands are not moved around the stack but when
  479.      more room is needed in the command stack rather than delete the
  480.      command on top the oldest, least used command is deleted.
  481.   Both - enables both Move Forward and Delete Least Used.
  482. If you use the Move Forward option then you might find it useful to
  483. have the UP key recall the next to last command rather than the last
  484. command (see below).  Try it and you'll see what I mean.
  485.  
  486. AUTOMATIC DISPLAY - can be set so that STACK will automatically 
  487. open the command stack or function key window when DOS is waiting 
  488. for a command.  
  489.  
  490. UPKEY RECALLS PREVIOUS COMMAND - In earlier versions of STACK the
  491. up arrow recalled the command prior to the last command rather
  492. than the last command.  Selecting "N" here will cause STACK @.0
  493. to behave in the same way as earlier versions.
  494.  
  495. ENABLE REPOSITIONING OF COMMAND LINE - if set to "Y" then STACK will
  496. reposition the command line if will interfere with the window.  If set
  497. to "N" then the length of the command line will be shortened to
  498. prevent it from overwriting the window display.
  499.  
  500. INSERT MODE DEFAULTS TO ON - if set to "Y" then STACK will start
  501. with insert mode on.
  502.  
  503. ENABLED OUTSIDE OF COMMAND LINE - normally STACK will only
  504. operate at the DOS prompt.  Allowing STACK to operate outside of
  505. the DOS prompt will allow you to use in in programs such as DEBUG
  506. and EDLIN (Does anyone use them ?).
  507.  
  508. MINIMUM LENGTH OF COMMAND TO KEEP - as there is not much point in
  509. storing away short commands you can instruct STACK not to keep
  510. commands below a certain length.
  511.  
  512. F3 ACTS AS UP KEY - switches F3 to act the same as the UP.
  513.  
  514. CHARACTER TO JOIN COMMANDS - the character you wish to use to
  515. concatenate commands.  This can be any printable ASCII character
  516. (the IBM extended character set is not allowed).
  517.  
  518. CHARACTER TO INDICATE LABEL - the character you wish to use to
  519. indicate that the preceding characters were a label only and are
  520. not to be executed.  This can be any printable ASCII character
  521. (the IBM extended character set is not allowed).
  522.  
  523. SEARCH CHARACTER - allows you to enable/disable the search for command
  524. facility and set the trigger key to either Shift-Tab or the '+' key. I
  525. suggest the '+' key as it is a single key stroke and easy to press.
  526.  
  527. SEARCH LENGTH - sets the number of characters from the command line to
  528. be used when searching the command stack for a match.
  529.  
  530. PATH/FILENAME FOR COMMAND FILE UPDATES - specifies the path and file
  531. name that STACK will look for when you press ALT-W.
  532.  
  533. SOURCE OF FILE NAME FOR CONTROL W/R - the file name to be used for
  534. Ctrl-W and Ctrl-R commands can either be set permanently to a name
  535. stored inside of STACK (see previous item) or the file name can be
  536. entered on the command line.  This option tells STACK where to look
  537. for the file name.
  538.  
  539. PATH/FILENAME FOR CONTROL W/R - (only offered if the source of 
  540. the filename for control W/R  is set to table file) specifies the 
  541. path and file name that STACK will look for when you press Ctrl-W 
  542. or Ctrl-R if you indicate that you won't be using the command 
  543. line to specify a file name (see next item).
  544.  
  545.  
  546. REGISTRATION, etc
  547. -----------------
  548.  
  549. STACK is NOT shareware and you are under no obligation to
  550. register as a user.  However the popularity of STACK has left me
  551. with something of a problem as it was becoming expensive to send
  552. people new versions (I had to stop).  So if you would like me to
  553. send you a new version of STACK I would ask that you include
  554. enough funds to cover the cost of a diskette, packaging and
  555. postage.  If you wish you may register as a user of STACK in
  556. which case I will undertake to automatically send you the next
  557. two updates to STACK and advise you of any subsequent updates.
  558. If you wish to register as a user then please send $20 to the
  559. address below giving your name, address and which version of
  560. STACK you are using.  If you just want the latest version then
  561. $10 should cover it.  If you are writing from outside Australia
  562. please add $4 for currency transfer costs.
  563.  
  564. Once again I would stress that you are not obliged to register as
  565. a user.  Feel free to just drop me a line if you have something
  566. to say about STACK.  If you have a good idea to incorporate or
  567. find a bug to be fixed I'll send you an update anyway.
  568.  
  569.  
  570. CONTACTING THE AUTHOR
  571. ---------------------
  572.  
  573. If you discover bugs in STACK or would like to discuss some
  574. aspects of it I can be contacted at home on (062) 369 216 or by
  575. writing to PO Box 78, Dickson, Australian Capital Territory, 2602
  576.  
  577.  
  578.  
  579. Shane Bergl
  580. 30 Mar 1990
  581.