home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 134.dms / 134.adf / CLED.doc < prev    next >
Text File  |  1988-07-25  |  12KB  |  275 lines

  1.                                 CLED    v1.4
  2.                             (Command Line EDitor)
  3.                                 May 21, 1987
  4.  
  5.                                     by
  6.  
  7.                                Pat R. Empleo
  8.                                April 21, 1987
  9.  
  10.  
  11.  
  12.  
  13. =============================   INTRODUCTION   =================================
  14.  
  15. CLED is a simple command line editor which allows you to edit your commands
  16. before and after they are processed by your Amiga. It uses the arrow keys and
  17. simple <CTRL> sequence keystrokes to position the cursor and to perform editing
  18. tasks. It also keeps a history of past commands for recall, editing, and
  19. resubmission.
  20.  
  21. It currently requires roughly 13.5K of your precious RAM.
  22.  
  23. The sole purpose for creating CLED is to provide command line editing capability
  24. to the Amiga CLI environment. It is not intended to be a full-blown shell which
  25. provides additional commands such as aliases or macros. In fact, there are
  26. currently only four such "internal commands" in CLED.
  27.  
  28.  
  29.  
  30.  
  31. ==============================   RESTRICTIONS   ================================
  32.  
  33. Like every man-made thing on this planet, CLED (especially CLED) is not perfect.
  34. Still, CLED is very useful in its present form, especially if you're use to
  35. operating systems such as VMS and/or are a lousy typist like myself.
  36.  
  37. The following limitations (that I've found so far) are discussed in order of
  38. severity ... 
  39.  
  40. 1. AmigaDOS EXECUTE command:
  41.    This is the big one!! Typing "EXECUTE filename" on the CLED command line
  42.    will not work. There is currently no script facility in CLED. In order to
  43.    execute script files, you must type "RUN EXECUTE filename". This implies that
  44.    some DOS commands and other programs evoked from within the script file may
  45.    not work as expected. Specifically, any program requiring input from an
  46.    interactive CLI will not work. Also, the DOS commands, CD and PATH, will be
  47.    valid only for the non-interactive CLI that was started and only until it
  48.    terminates. If you do type "EXECUTE whatever", then the command will not
  49.    execute until you have exited CLED. Simply exit CLED if your script file
  50.    does not execute correctly.
  51.  
  52.    I toyed with the idea of adding script capablility to CLED, but the idea of
  53.    duplicating what the AmigaDOS EXECUTE command does in a "normal", interactive
  54.    CLI window horrified me! All I want is to edit the command line!
  55.  
  56. 2. The AmigaDOS redirection operators, < and >, are not supported, so typing
  57.    commands such as "dir >prt:" or "info >filename" won't work. However, you can
  58.    get around this by typing "run dir >prt:" or "run info >filename" or
  59.    "run whatever  <input  >output", so long as the process you run doesn't
  60.    require any input from an interactive CLI.
  61.  
  62. 3. Currently, CLED does not allow "stacking of commands".
  63.  
  64. 4. AmigaDOS Template feature:
  65.    Trying to display the templates of AmigaDOS commands won't work. For example,
  66.    typing "DATE ?" or "DIR ?" will only get you a "Bad arguments" message.
  67.  
  68. 5. CLED PROMPT command:
  69.    The CLED PROMPT command does not have a %n feature like the AmigaDOS version.
  70.    Typing "PROMPT whatever" on the command line will evoke the CLED PROMPT
  71.    (see the CLED COMMANDS section). Typing "RUN PROMPT whatever" will evoke the
  72.    AmigaDOS PROMPT, however, your new prompt will not appear until you've exited
  73.    CLED.
  74.  
  75. 6. AmigaDOS RUN command:
  76.    Using the RUN command in the form "RUN command+command+command,,,,,,,,,"
  77.    doesn't work. Does anyone ever use this????
  78.  
  79. 7. CLED runs only under 1.2 of the Amiga operating system.
  80.  
  81. 8. CLED keeps only the last 30 commands. I'll probably add a command so you can
  82.    change the limit of the history stack.
  83.  
  84. 9. Currently, CLED will accept no more than 20 arguments and no more than 255
  85.    characters on the command line.
  86.    
  87. 10. CLED is always in insert mode. I doubt if I'll add overwrite capability
  88.     ------ I NEVER had the need.
  89.  
  90.  
  91.  
  92.  
  93. =================================   USAGE   ====================================
  94.  
  95. Format:   cled [string [color]]
  96.  
  97. Place CLED in your C: directory or define a PATH to it.
  98.  
  99. CLED is invoked by typing "cled" at the CLI command line, with or without
  100. arguments. The optional arguments allow you to specify a prompt and its color
  101. when CLED starts up (see CLED COMMANDS - prompt). Don't start the program by
  102. typing "run cled" or thereafter, your display will become extremely confusing.
  103.  
  104. If CLED is to be included in the startup-sequence script file, it should be the
  105. last statement in the file or else commands that follow will not be executed
  106. until CLED is exited.
  107.  
  108.  
  109.  
  110.  
  111. ===========================   EDITING COMMANDS   ===============================
  112.                                                                               
  113. Keystrokes      Action                                                
  114. ----------      ----------------------------------------------------------------
  115. Up-arrow        Scrolls up through the previous commands (history) entered on
  116.                 the command line
  117.                                                                               
  118. Down-arrow      Scrolls down through the previous commands (history) entered on
  119.                 the command line
  120.                                                                               
  121. Left-arrow      Moves cursor left through the command string          
  122.                                                                              
  123. Right-arrow     Moves cursor right through the command string         
  124.                                                                               
  125. <DEL>           Forward deletes character on the command line         
  126.                                                                               
  127. Shift-Left-     Moves cursor to the Beginning of the command string   
  128. Arrow or ^B                                                        
  129.  
  130. ^D              Delete from cursor to end of command line
  131.  
  132. Shift-Right-    Moves cursor to the End of the command string         
  133. Arrow or ^E                                                        
  134.                                                                               
  135. <BS> or ^H      Backward deletes character on the command line        
  136.                                                                              
  137. <HELP>          Displays history of the commands entered on the command line.
  138.                 If a history number (displayed next to the command string) is
  139.                 entered on the command line, the corresponding command string
  140.                 will be placed on the command line for resubmittal or editing
  141.                                                                             
  142. <RET> or ^M     Submits the command which the cursor is on for processing; the
  143.                 cursor does not have to be at the end of the command string. If
  144.                 the string is a history number, its corresponding command will
  145.                 be placed on the command line
  146.  
  147. ^W              Move forward to next word
  148.  
  149. ^X or ^U        Erases the command line. "Clicking" the window's resizing
  150.                 gadget will also clear the line.
  151.  
  152. ^key            Clears the screen. Pressing any valid ^key combination other
  153.                 than the ones discussed in this document will clear the screen.
  154.  
  155.  
  156.  
  157.  
  158. ============================   CLED COMMANDS   =================================
  159.  
  160. Command         Action
  161. -------         ----------------------------------------------------------------
  162. <TAB>           Executes the commands corresponding to a list of history numbers
  163.                 entered at the command line. The numbers must be separated by
  164.                 spaces.
  165.  
  166.                 Format:        n1 n2 n3 ... nn<TAB>
  167.  
  168.                 Parameters:    n      - History numbers; pressing the <HELP> key
  169.                                         will display a history of commands, and
  170.                                         high-lighted to the right are their
  171.                                         corresponding numbers. The numbers can
  172.                                         listed in any order desired
  173.  
  174.                                <TAB>  - Pressing the <TAB> key or typing ^I
  175.                                         The cursor need not be at the end of the
  176.                                         line
  177.  
  178.                 Example:       2 25 6 8 1<TAB>
  179.                                2 2 2 3 3 29 1 1 1 3<TAB>
  180.  
  181.  
  182. cd              This command duplicates the action of the Amiga DOS CD
  183.                 (change directory) command. Typing the command with no arguments
  184.                 will cause CLED to use the CD command found in your C:
  185.                 (or whatever) directory. This assumes that your change directory
  186.                 command is named CD, of course.
  187.  
  188.                 The only reason it's a built-in function is because a certain
  189.                 Russell Leighton kept on griping about having to click into
  190.                 the system requestor ("Insert Disk") which came up whenever you
  191.                 CDed to a new directory from the old directory, and the old
  192.                 directory's disk was not in a drive. Well, he's right, it was a
  193.                 pain!
  194.  
  195.  
  196. prompt          Changes the prompt and optionally its color.
  197.  
  198.                 Format:        prompt string [color]
  199.  
  200.                 Parameters:    string - New prompt string; if the new prompt has
  201.                                         imbedded spaces, then the string must
  202.                                         be enclosed in quotes. Escape sequences
  203.                                         can be included in the string, but only
  204.                                         at the front; this allows for further
  205.                                         customizing of your prompt. On CLED
  206.                                         startup, the default prompt is ">>- ".
  207.  
  208.                                color  - Color of the prompt where color is one
  209.                                         of the following numerical values:
  210.  
  211.                                            1  WorkBench foreground color
  212.                                            2  WorkBench gadgets color
  213.                                            3  WorkBench cursor color
  214.                                            
  215.                                         This parameter is optional. If no value
  216.                                         is given, the current color is used. 
  217.                                         The history numbers will also be
  218.                                         displayed in the current color. On
  219.                                         CLED startup, the default color is 3.
  220.  
  221.                 Examples:      prompt "Hi There! "
  222.                                prompt "$ " 2
  223.                                prompt "<ESC>[3;32;40mYes Master? " 3
  224.  
  225.  
  226. exit            Deallocates any allocated memory and exits to the system CLI.
  227.  
  228.                 Format:        exit
  229.  
  230.                 Parameters:    n/a
  231.  
  232.                 Example:       exit            (Simple huh??!?)
  233.  
  234.  
  235.  
  236.  
  237. ================================  REVISIONS  ===================================
  238.  
  239. v1.4   (05/21/87)   CD, internal change directory command was added
  240.  
  241. v1.3   (05/01/87)   CLED now works correctly when CHANGETASKPRIed higher than 4
  242.  
  243. v1.2   (04/29/87)   ^E bug fix
  244.  
  245. v1.1   (04/24/87)   Added ^D, delete from cursor to end of command line;
  246.                     Added ^W, advance cursor to next word;
  247.  
  248. v1.0   (04/22/87)   Initial Release
  249.  
  250.  
  251.  
  252.  
  253. =================================   NOTES   ====================================
  254.  
  255. CLED was compiled and linked using MANX Aztec C68K, v3.4a
  256.  
  257. If you have any questions, suggestions, flames, or find any bugs, you can
  258. contact me during my normal slave hours of 8:00 AM to 4:00 PM at (408)778-4644
  259. (voice only, sorry), or leave a message on AMIC, (707)579-0523.
  260.  
  261.                                                    Pat R. Empleo
  262.                                                    May 21, 1987
  263.  
  264.  
  265.  
  266.  
  267. ==============================   DISTRIBUTION   ================================
  268.  
  269. This program is placed in the PUBLIC DOMAIN. You may do as you wish with it
  270. (which isn't much) except sell it, but please keep the distributed ARCed file
  271. intact, and do not remove this documentation (or my name for that matter).
  272.  
  273. If you fail to abide with the above, may the Great GURU curse your bits forever,
  274. or at least until you croak from radiation from your CRT!!!
  275.