home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / shell / zshell / zshell.doc < prev    next >
Text File  |  1995-01-02  |  83KB  |  1,849 lines

  1. ZShell-Documentation 2.2 (02.01.95)
  2.  
  3.             #============================================#
  4.             #    ZSHELL V1.30 (C) 1990,91 PAUL HAYTER    #
  5.             # updated to V2.2 (C) 1993,94 MARTIN GIERICH #
  6.             #============================================#
  7.  
  8. If you have used another version of ZShell, please read Changes.
  9. ---------------------------------------------------------------------------
  10. Contents
  11.  
  12. Introduction
  13. Features
  14. For those who never read the whole Documentation
  15. Distribution
  16. General Usage:
  17.   Starting ZShell
  18.   History and Command Line Editing
  19.   Executing Commands
  20.   Wild Cards
  21.   Filenamecompletion
  22.   Options
  23.   Redirect Input/Output
  24.   Special Characters
  25.  
  26. Builtin Commands for Disk Management
  27. Builtin Commands for Scripts and Controlling
  28. Builtin Commands for Advanced Users
  29.  
  30. Past, Present and Future:
  31.   Changes
  32.   Tips and Hints
  33.   Possibilities for Future Improvements
  34. Copyright
  35. Credits
  36. Authors
  37. ---------------------------------------------------------------------------
  38. Introduction
  39.  
  40. ZShell is a small, fast and powerful SHELL replacement.
  41. Have a look at Features to see the advantages.
  42. ZShell is tested with Kickstart 1.3 , 2.04 and 3.0 and should
  43. run also with other Kickstarts. There are no special requirements.
  44. I tried to made usage similar to AmigaDOS. If you did not
  45. understand something, have a look at your AmigaDOS usermanual.
  46. ---------------------------------------------------------------------------
  47. Features
  48.  
  49. Freeware, no payment required.
  50. * Usage is similar (or better) to the standard AmigaDOS shell.
  51. * About 26K small (pure assembler code, source included).
  52. * Supports the standard housekeeping commands which are builtin,
  53.   so no disk access is necessary.
  54.   eg. list, dir, cd, rename, makedir, delete, copy, path, info, type
  55. * A total of 64 builtin commands.
  56. Starting from Workbench or CLI/Shell.
  57. Filenamecompletion by simply pressing TAB.
  58. Review-buffer to see what scrolled out of the window.
  59. Command line editing better than KS2.0 .
  60. Command line history with searching.
  61. * Command and Function key aliasing.
  62. Online Help function and AmigaGuide-Documentation with examples.
  63. * Colorful output (or fast scrolling with OS3.0+, see CTRL -R)
  64. Wild Card file descriptions (*,?,~,[],|).
  65. DIR and LIST both sort (by default) and show filesize.
  66. * Simple MORE type text viewer.
  67. * Has a kind of Memory-Clock with alarm.
  68. * Makes itself resident for quicker starting and memory saving.
  69. Script file execution and special script commands (like IF, ASK).
  70. * Some commands and features for debugging system/programs.
  71. ---------------------------------------------------------------------------
  72. For those who never read the whole Documentation
  73.  
  74. Start the file called ZShell from Workbench or CLI (SHELL), or even
  75. better: Put the file ZShell in the C: directory and start the file ZSH.
  76. Now press the HELP key. Among lots of other information you see "TYPE HELP
  77. ? ...". Make sure that ZShell.doc is in the current directory or in S:
  78. and try that. You will see how to use the ONLINE HELP. Try to type
  79. "HELP HISTORY" to see how command line editing works. Execute the
  80. example startup file "ZStart" or put it into the S: drawer and
  81. have a look at it.
  82. Please send me your comment; my Internet-Adress is:
  83. uj3w@ibm3090.rz.uni-karlsruhe.de (Martin Gierich).
  84.  
  85. Things somewhere hidden in the documentation:
  86. * To avoid using an internal command or an alias, you can put a point
  87.   before it, eg. ".assign libs: df0:libs add".
  88. * To complete a filename, type in a bit then press TAB.
  89. * If you use "ctrl -c *.info", DIR and Filenamecompletion ignores Icons.
  90. * To start buffering output, use "review 20000". Press Shift+TAB to see it.
  91. * If you have OS3.0+, try "ctrl -r 01111111".
  92. * If you start ZShell from the Workbench-Menu "Execute Command", you
  93.   can close the window after ending ZShell with CTRL-\ .
  94. * You get a standard prompt with: prompt "%n.%p> "
  95. * Try to execute "ZShell ?".
  96. * See Tips and Hints for more.
  97. ---------------------------------------------------------------------------
  98. Distribution
  99.  
  100. Following files belong to this document:
  101.  1) ZShell           The main executable
  102.  2) ZSH              The small starter
  103.  3) ZShell.doc       The documentation (and online help manual)
  104.  4) ZShell.guide     The AmigaGuide documentation
  105.  5) ReadMe           Short description
  106.  6) ZStart           An example startup script (can be put in S: )
  107.  7) ZShell.s         Source code of the main executable
  108.  8) ZSH.s            Source code of the small starter
  109.  and some icons.
  110. ---------------------------------------------------------------------------
  111. Starting ZShell
  112.  
  113. * There are three ways of starting ZShell:
  114.   1. The easiest way:
  115.      Start the file called "ZShell" from Workbench or CLI/Shell.
  116.   2. Put the file called "ZShell" in the C: directory and
  117.      start the file called "ZSH" from Workbench or CLI/Shell.
  118.   3. A bit complicated and only for starting from Workbench:
  119.      Make a startup script (see below) or an empty file with a PROJECT
  120.      icon. Change the default tool to "ZSH" or "ZShell" (better ZSH,
  121.      but put ZShell in C: ) with the right path. Doubleclicking on
  122.      this project icon will start ZShell and execute its script.
  123.      You can also shift-doubleclick a startup script with ZSH/ZShell.
  124. (You can rename "ZSH" as what you like, but do not rename "ZShell").
  125. The first way is recommended for having a quick glance at ZShell,
  126. but if you use ZShell sometimes, the second way is better.
  127. Why ? Because "ZSH" is about 800 Bytes long and starts the ZShell-
  128. resident if possible. So loading "ZShell" is only necessary the first
  129. time you use ZShell after booting up.
  130. * If starting from CLI/Shell you can specify the name of a script file
  131.   (see EXECUTE) as an argument which will be executed after starting.
  132.   Precede the name with "-s". If there is no name given, ZShell will try
  133.   to execute S:ZStart . After "-w" you can specify a window-description.
  134.   See NEWCLI for more details, it is exactly the same.
  135.   eg.     ZSH -sram:hello     {will try to execute ram:hello}
  136.           ZShell              {will try to execute S:ZStart}
  137.           ZSH -sram:hello "-wCON:10/10/90/90/Hi there" {opens this window}
  138. * If starting from Workbench you can specify the window-description
  139.   and the startup script (default S:ZStart , see above) with ToolTypes:
  140.   eg.     WINDOW=con:20/50/400/100/Moin
  141.           SCRIPT=ram:hello
  142.           WINDOW=             {this would not open a window}
  143.   Make sure that WINDOW and SCRIPT are in capital letters.
  144.   (You can edit the ToolTypes by selecting an icon and then choosing
  145.   "Information" from the Workbench-Menu.)
  146. * NOTE1: If you start ZShell from the Workbench-Menu "Execute Command",
  147.  you can close the window after ending ZShell with CTRL-\ .
  148. * NOTE2: ZShell and ZSH are PURE (see RESIDENT,PROTECT).
  149. ---------------------------------------------------------------------------
  150. History and Command Line Editing
  151.  
  152. ZShell has a 1024 byte circular history buffer. It works similar
  153. to most other shells, the NEWCON: handler in Workbench V1.3 and
  154. the standard console handler in Kickstart 2.0+.
  155.  
  156. You can change the edit keys with CTRL. These are the default keys:
  157.   UP ARROW        - go back one line in the history buffer
  158.   DOWN ARROW      - go forward one line in the history buffer
  159.   SHIFT UP ARROW  - go to the 1st line in the history buffer if nothing
  160.                     was typed. Otherwise the string left of the cursor
  161.                     will be searched in history buffer (like KS2.0+)
  162.   SHIFT DOWN ARROW- go to the last line in the history buffer, which
  163.                     should be blank
  164.   LEFT ARROW      - move cursor left
  165.   RIGHT ARROW     - move cursor right
  166.   SHIFT LEFT ARROW- move cursor to left end
  167.   SHIFT RIGHT ARROW move cursor to right end
  168.   
  169.   CTRL S          - move cursor to start of line
  170.   CTRL E          - move cursor to end of line
  171.   CTRL R          - move cursor to start of previous word
  172.   CTRL T          - move cursor to start of next word
  173.  
  174.   CTRL W          - delete one word right of cursor
  175.   CTRL Q          - delete one word left of cursor
  176.   CTRL X          - delete whole line
  177.   CTRL L          - clear the ZShell window
  178.  
  179.   RETURN          - put commandline in history-buffer and execute it
  180.   SHIFT RETURN    - put commandline in history-buffer without executing
  181.   TAB             - see FILENAMECOMPLETION (that is great !)
  182.   SHIFT TAB       - read review-buffer with MORE
  183.   CTRL V          - read history-buffer with MORE
  184.   ESC (Escape)    - quit ZShell like ENDCLI (I like this very much !)
  185.  
  186. Words are delimited by space, point, slash and colon ( ./:).
  187. Again, command line editing is similar to most shells. Backspace,
  188. delete and return do what they are supposed to do.
  189. ---------------------------------------------------------------------------
  190. Executing Commands
  191.  
  192. Most commands can be aborted by depressing Control-C.
  193. Nearly everything is case independent.
  194. To use a disk command simply type its name after the prompt, the
  195. same way as you would do in other shells. The first part of the input
  196. up to the first space is interpreted as commandname. It is searched
  197. for (in this order) :
  198.   1. in the alias list
  199.   2. in the internal (builtin) command list (see BUILTIN COMMANDS)
  200.   3. in the resident command list
  201.   4. in the current directory (see CD)
  202.   5. in the command search path
  203. and, if it is found, it is executed. The part after the first space
  204. is taken as arguments, also called parameters. The arguments are
  205. separated by spaces. ZShell will allow up to 25 arguments.
  206. If the commandname is a directory, the current directory will be
  207. changed (see CD).
  208.  
  209. eg.     addbuffers df0: 15
  210. "addbuffers" is the command, that will be found as a internal command.
  211. "df0:" is the first argument. "15" is the second argument. The third
  212. argument does not exist.
  213.  
  214. You can avoid using an alias or an internal (builtin) command or
  215. changing the current directory by typing a point before the
  216. commandname (this is called "force disk").
  217. To abbreviate internal or resident commands put a point behind it.
  218. If you use just a point, the current directory will be set to the
  219. last current directory ("dir back").
  220.  
  221. eg.     .addbuffers df0: 20
  222. {This uses the disk command or if available the resident addbuffers}
  223.         ad. df0: 20  {uses the internal addbuffers command}
  224.         .ad. df0: 20 {if available this uses the resident addbuffers}
  225.         .            {go back to old current dir}
  226.  
  227. BEWARE of other matching commands! The first matching will be taken!
  228. res. can mean reset or resident, but reset will be taken !
  229. There is no abbreviation for disk commands, take FileNameCompletion
  230. ( TAB-Key ) instead.
  231.  
  232. A textual error message will be displayed if an AmigaDOS error occurs.
  233. ---------------------------------------------------------------------------
  234. Wild Cards
  235.  
  236. ZShell supports wild card file descriptions on some commands
  237. (DIR,LIST,DELETE,COPY,RECOPY,CTRL). Wild cards are like those
  238. supported on MS-DOS (tm) or UNIX (tm) systems, and not the same as
  239. the ones on AmigaDOS. So use * instead of #? .
  240. NOTE: You can only effectively put one * character in a wild card.
  241.  
  242. Character       Meaning
  243.   *         Match zero or more characters.
  244.   ?         Match one character.
  245.   ~         Negates the following wildcard.
  246.  [  ]       Specifies a class of characters to match.
  247.             (One of the characters in the brackets must match)
  248.   |         Separate multiple filenames (can be wildcards)
  249.             (One of the file descriptions separated by | must match)
  250.  
  251. To get that just try the examples following and try it out with DIR.
  252. eg.    list *.info      {lists all files ending in .info}
  253.        dir z*.s         {lists all files starting z, ending in .s}
  254.        delete df0:*.info   {deletes all .info files from df0:}
  255.        copy *.s ram:    {copies all .s files to ram:}
  256.        copy 1? df0:     {copies all two char files beginning with 1}
  257.        dir ~*.s         {lists all files NOT ending in .s}
  258.        list ~*.info     {lists all files except for .info files}
  259.        dir *.[co]       {lists files ending in .c or .o}
  260.        list [abcd]*     {lists files beginning with a,b,c or d}
  261.        list c:mount|version {lists the files Mount and Version}
  262.        list ram:env/a*|*b   {lists all files starting with a or
  263.                              ending with b from RAM:env (environment)}
  264.        copy ~*.info|*.bak   {copies all files NOT ending in .info
  265.                              and NOT ending in .bak}
  266. ---------------------------------------------------------------------------
  267. Filenamecompletion
  268.  
  269. Filenamecompletion makes typing long filenames and directorynames
  270. easier. It does not matter if you want to type it as command or as
  271. argument. Just type some beginning characters of the desired name and
  272. then press TAB . If there is more than one possibility that
  273. match, it will only be completed as far as all possibilities match.
  274. In this case type the next character then again press TAB . If a
  275. filename was fully matched, a space after it will be inserted. If
  276. a directoryname was fully matched, a slash (/) will be inserted after.
  277. If no partial match is found, the screen blinks (display beep).
  278. Maybe you do not want *.info files to be completed. This will avoid
  279. some trouble. Use "ctrl -c *.info" for that or see CTRL.
  280.  
  281. For example a directory contains:
  282.   MegaEditExample
  283.   MegaEditExample.info
  284.   MegaViewer
  285.   MoreMegaFiles               {directory}
  286.  
  287. If you want to change the current directory to MoreMegaFiles you type:
  288.     mo
  289. then press the TAB key. You will see the full name with a slash at the
  290. end. Just press RETURN and you changed it.
  291. To delete MegaViewer you type:
  292.     delete me
  293. and press TAB . You will see "Mega". Now type the V key and
  294. press TAB again. You see "delete MegaViewer ". Press RETURN and
  295. it will be gone.
  296. You want to start MegaEditExample. Type:
  297.     me
  298. and press TAB. Then type E and press TAB. There is no space after the
  299. name. This is because MegaEditExample.info also matches.
  300. Start it by pressing RETURN.
  301. ---------------------------------------------------------------------------
  302. Options
  303.  
  304. The internal commands support only three options, because this is
  305. easier to remember. These options start with a dash (-) .
  306.   1. -C or -CLEAR , used by AVAIL,ENDCLI,LOCATE,PATH,
  307.                     RESIDENT,RUN,CTRL
  308.   2. -R or -RECURSIVE , used by COPY,DELETE,DIR,LIST,RECOPY
  309.   3. -Q or -QUICK , used by DIR,LIST
  310. So instead of typing "dir -q" you can also type "dir -quick".
  311. As nearly everything, options are also case independent.
  312. ---------------------------------------------------------------------------
  313. Redirect Input/Output
  314.  
  315. The standard redirection operators are supported for all internal
  316. commands, as well as disk based programs. (Redirection only affects
  317. those programs which use the dos.library's Input() and Output()
  318. functions.)
  319.  
  320.     >  redirect std output.
  321.     <  redirect std input.
  322.     >> append redirect output. (tacks output onto the end of file)
  323.     <> redirect input and output (not yet implemented).
  324.  
  325. eg.    dir >ram:directory df0:c
  326.        type zshell.doc <raw:0/0/100/100/input >raw:0/0/640/100/output
  327.        sortfile things >>df0:things.log
  328. ---------------------------------------------------------------------------
  329. Special Characters
  330.  
  331. The following characters have special meanings to ZShell.
  332.  
  333.   "  "   Double quotes. Used to enclose strings with spaces.
  334.          eg "hello world".
  335.   ^n     Hat character. Prefixes a control character letter (n).
  336.          Used in ASK,ECHO&ALIAS commands. eg ^L   <-clear screen
  337.   %n     Percent prefixes a number (0-7) to specify an optional
  338.          parameter for command aliases. Used in ALIAS command.
  339.          Can also be used to specify prompt arguments. See PROMPT.
  340.   $n     Dollar prefixes a number (0-7) and corresponds to an
  341.          optional parameter specified with %n (above).
  342.   *?~[]| Wild card characters. * matches 0 to n characters. ? matches
  343.          one character, ~ negates the following wild card, and [ ]
  344.          surround a class of characters to match.
  345.   \n     Backslash prefixes a special character, whose meaning you
  346.          want ignored. eg.  echo "hello \"fred\""  (hello "fred")
  347.   ;      Semi-colon seperates multiple commands on one line.
  348.          eg. cd df1:;dir
  349.   >      redirect output.
  350.   <      redirect input.
  351.   >>     redirect append output.
  352. ---------------------------------------------------------------------------
  353. ###########################################################################
  354. ###########################################################################
  355. ###########################################################################
  356. ---------------------------------------------------------------------------
  357. Builtin Commands for Disk Management
  358.  
  359. Following there are descriptions of the standard DOS commands which are
  360. builtin in ZShell (and therefore need not be loaded from disk).
  361. Square brackets [] mean that the argument enclosed in is optional.
  362. A vertical bar | separates multiple possibilities, choose only one.
  363.  
  364. AddBuffers  drive number_of_buffers
  365. Assign  [logical name:] [directory]
  366. Cd  [destination]
  367. Copy  [-R] sourcefile1 [sourcefile2] ... destination
  368. Delete  [-R] source1 [source2] [source3] [source4] ...
  369. Dir  [-Q] [source]
  370. FileNote  file|directory comment
  371. HType  source
  372. Info 
  373. Join  [sourcefile1] [sourcefile2] ... destfile
  374. List  [-R] [-Q] [source]
  375. Lock  device ON|OFF
  376. MakeDir  [directory1] [directory2] ...
  377. More  source [line count]
  378. Protect  [filename] [h|s|p|a|r|w|e|d]
  379. Relabel  drive newname
  380. Rename  source destination
  381. Resident  [command1] [command2] ...
  382. Search  file search_string
  383. SetDate  file|directory [date/time]
  384. Type  source
  385. ---------------------------------------------------------------------------
  386. ADDBUFFERS drive number_of_buffers
  387.  
  388. * ADDBUFFERS increases disk access speed on the specified drive by
  389.   adding a number of sector cache buffers. Each additional buffer
  390.   reduces memory by about 560 bytes. Generally, 25-30 buffers per
  391.   floppy drive is optimal.
  392.  
  393. eg.     addbuffers df0: 25
  394.         addbuffers df1: 30
  395. ---------------------------------------------------------------------------
  396. ASSIGN [logical name:] [directory]
  397.  
  398. * ASSIGN will assign a logical device name (must end in a colon (:) )
  399.   to a disk directory.
  400.  
  401. eg.     assign z: df1:zshell_source
  402.   Now if you do a DIR Z: you will get a directory of df1:zshell_source.
  403.   Similarly, the default device names can be reassigned.
  404. eg.     assign libs: df1:libs
  405.  
  406. * Typing ASSIGN with no parameters, will list the current device
  407.   assignments.
  408. eg.     assign
  409.  
  410. ASSIGN is compatible with the AmigaDOS Assign command.
  411. ---------------------------------------------------------------------------
  412. CD [destination]
  413.  
  414. * Changes the current directory to "destination". If no parameter
  415.   is given, the current directory's name is shown. It is easier to
  416.   change the directory by simply typing its name (without CD).
  417.  
  418. eg.     cd ram:
  419.         ram:t               {same as "cd ram:t"}
  420. ---------------------------------------------------------------------------
  421. COPY [-R] sourcefile1 [sourcefile2] ... destination
  422.  
  423. * There are 6 derivatives of the copy command :
  424.   1. copy file to file.
  425.      eg.     COPY C:LIST RAM:LS
  426.   2. copy file to a directory.
  427.      eg.     COPY C:MOUNT DF1:C
  428.   3. copy multiple files to a directory.
  429.      eg.     COPY L:PORT-HANDLER L:DISK-VALIDATOR DF1:L
  430.   4. copy files in a directory to another directory.
  431.      eg.     COPY C: DF2:C
  432.   5. copy multiple directories to a single directory.
  433.      eg.     COPY L: DEVS: C: RAM:
  434.   6. Recursively copy all files and subdirectories within the source
  435.      directory to the destination directory.
  436.      eg.     COPY -R DF0: DF1:
  437.  
  438. Other examples:
  439.         copy fred wilma
  440.         copy c:dir df1:c
  441.         copy dir list type cd df1:c
  442.         copy -r df0:devs df1:devs
  443.         copy -r source:*.s ram:
  444.         copy df0: df1:          {only copy the files in df0: to df1:}
  445. ---------------------------------------------------------------------------
  446. DELETE [-R] source1 [source2] [source3] [source4] ...
  447.  
  448. * Deletes one or more files or directorys ("source1","source2",...).
  449. * If you specify the -r option when deleting a directory, then all
  450.   subdirectories are recursively deleted also. Otherwise (if the -r
  451.   option is not given) only the files in the specified directory are
  452.   deleted.
  453. WARNING: You can hardly get back what you have deleted !
  454.   So be careful, especially when using the -r option !
  455.   (Try DISKSALV for getting lost files back, DO NOT USE DISCDOCTOR!)
  456.  
  457. eg.     delete fred wilma barney betty dino
  458.         delete df0:devs df1:c df1:data ram:
  459.         delete menu
  460.         delete -r devs:
  461.         delete -r df1:  {better use "format drive df1: name x quick"}
  462. ---------------------------------------------------------------------------
  463. DIR [-Q] [-R] [source]
  464.  
  465. * Lists the directory of the "source" to the screen. Hitting space
  466.   will pause the listing and backspace will continue it. Files are
  467.   shown with their size in bytes. DIR lists the current directory
  468.   if no parameter is given. If "source" is a filename, then only
  469.   that file is listed. If the option "-q" is not given, the filenames
  470.   will be sorted alphabetically. With the option "-R" given
  471.   it will list recursive.
  472. * All files/dirs with the H-bit (see PROTECT) set, will not be shown.
  473.   All files that are ignored by FILENAMECOMPLETION are also hidden.
  474.  
  475. eg.     dir df0:
  476.         dir -q devs:printers/hp*
  477. ---------------------------------------------------------------------------
  478. FILENOTE file|directory comment
  479.  
  480. * FILENOTE creates or changes a comment of the file or directory.
  481.   This comment can be up to 116 characters long and can be displayed
  482.   using the LIST command. It is useful if the filename does not say
  483.   what for this file is. Add a comment to this file and you will
  484.   forever know what this file does.
  485.  
  486. eg.     filenote devs:mountlist "This is used by the mount command"
  487. ---------------------------------------------------------------------------
  488. HTYPE source
  489.  
  490. * HTYPE outputs a hex listing of the file specified. Output is the
  491.   same as the M command. SPACE pauses the listing, BACKSPACE
  492.   gets it going again, and CTRL-C will abort the listing.
  493.  
  494. eg.     htype c:list
  495. ---------------------------------------------------------------------------
  496. INFO
  497.  
  498. * Lists lots of information about all available volumes (like disks).
  499.   These columns mean:
  500.   NAME: Name of the device containing the volume
  501.   UNIT: Unitnumber, not very interesting
  502.   SYS:  Filesystem, can be one of:
  503.         OFS : Oldfilesystem (old fashioned and slow)
  504.         FFS : Fastfilesystem (needs at least Kick 2.0)
  505.         INO/INF : International OFS/FFS
  506.         DCO/DCF : Directory Cache OFS/FFS (needs Kick 3.0)
  507.         MSD : CrossDOS Filesystem (MessyDOS)
  508.         ??? : Unknown
  509.   SIZE: Maximum useable size of the Volume in KBytes (1024 Bytes)
  510.   FREE: Free/useable size in KBytes
  511.   FULL: Ratio between used size and maximum size
  512.   BLOCK: Size of a single block in Bytes
  513.   STATUS: Says if it is possible to write to that volume
  514.   ERR:  Number of soft errors, I only saw 0 yet
  515.   VOLUME: Name of the volume (name of the disk).
  516. * Note: It would not make sense to show the free size in Bytes,
  517.   because space can only be allocated in whole blocks and one
  518.   block is at least 488 Bytes large.
  519.  
  520. eg.     info
  521. ---------------------------------------------------------------------------
  522. JOIN [sourcefile1] [sourcefile2] ... destfile
  523.  
  524. * JOIN concatenates one or more files to form a new file (destfile).
  525.  
  526. eg.     join fred.doc roy.doc dog.doc mydocs.doc
  527. ---------------------------------------------------------------------------
  528. LIST [-R] [-Q] [source]
  529.  
  530. * Lists the directory of the "source" to the screen. Hitting space
  531.   will pause the listing and backspace will continue it.
  532. * LIST acts similar to DIR, but outputs more information:
  533.   - Hidden files will be shown
  534.   - Shows the date and time of the last change (date-of-last-change)
  535.   - Shows the protection-bits (see PROTECT)
  536.   - If available, the comment will be shown (see FILENOTE)
  537. * LIST supports recursive listing. That means the contents of all
  538.   subdirectories are shown. To use it, specify the -r option.
  539.  
  540. eg.     list
  541.         list sys:system
  542.         list -q df0:
  543.         list -r -q *.info    {show all INFO-files in the current and
  544.                               in the sub-directories}
  545.         list -r ram:~*.info  {show all except *.info files in RAM:}
  546. ---------------------------------------------------------------------------
  547. LOCK device ON|OFF
  548.  
  549. * "LOCK device ON" locks the write-access to a device
  550. eg.     lock df0: on
  551.   will make it impossible to write to or change something on the
  552.   disk inserted in DF0:
  553. * "LOCK device OFF" makes write-access to a device possible again.
  554.  
  555. eg.     lock dh0: on
  556.         lock dh0: off
  557. ---------------------------------------------------------------------------
  558. MAKEDIR [directory1] [directory2] ...
  559.  
  560. * Creates one or more directories of the names specified.
  561.  
  562. eg.     makedir temp
  563.         makedir c l s libs devs fonts
  564.         makedir devs/printers ram:c
  565. ---------------------------------------------------------------------------
  566. MORE source [line count]
  567.  
  568. * MORE acts as a simple (ANSI) text file viewer. By default, it will
  569.   show 19 lines of a text file, then wait for some user input.
  570.   To move around in the text, you can use the CURSOR-KEYS:
  571.     UP        : Go one line up
  572.     DOWN      : Go one line down
  573.     LEFT      : Go one page (default 19 lines) up
  574.     RIGHT     : Go one page down
  575.     SHIFT-UP  : Go to the top of the text
  576.     SHIFT-DOWN: Go to the bottom of the text
  577.  
  578.   The key "P" creates a printout of the text (sends the text to PRT:)
  579.  
  580.   The key "S" will prompt you what to search for. If you just press
  581.   RETURN, then the last item will be searched for. Searching begins
  582.   at the second top line shown. If the item is found, the line, it
  583.   is in, is displayed as the first line.
  584.  
  585.   Typing any other key will abort you back to the shell.
  586.  
  587. eg.     more readme
  588.  
  589. * Specifying the optional line count will allow you to show more or
  590.   less than the default 19 lines. {Very useful for large borderless
  591.   PAL screens or small windows}
  592.  
  593. eg.     more contents 12
  594.         more super.doc 25
  595. ---------------------------------------------------------------------------
  596. PROTECT [filename] [h|s|p|a|r|w|e|d]
  597.  
  598. * Allows you to alter/see the protection bits associated with a file
  599.   or a directory (default: current directory).
  600.  
  601. * PROTECT filename
  602.   Shows the protection bits for the file specified.
  603.  
  604. eg.   protect editor
  605.  
  606. * PROTECT filename [h|s|p|a|r|w|e|d]
  607.   Toggles the specified protection bits on the file.
  608.  
  609. eg.   protect editor pd
  610.   If "editor" was already pure, then the pure bit would be reset.
  611.   If "editor" was not pure, then the pure bit would be set.
  612.   If "editor" was deletable, then the delete bit would be reset.
  613.   If "editor" was not deletable, then the delete bit would be set.
  614.  
  615. eg.   protect game hprwd
  616. eg.   protect monitor hsparwed
  617.  
  618. Bits:   "h"     hidden  V1.3
  619.         "s"     script  V1.3
  620.         "p"     pure    V1.3
  621.         "a"     archive V1.3
  622.         "r"     readable
  623.         "w"     writable
  624.         "e"     executable
  625.         "d"     deletable       <- V1.2 only understands this bit
  626. ---------------------------------------------------------------------------
  627. RELABEL drive newname
  628.  
  629. * RELABEL renames the disk specified with the newname given.
  630.  
  631. eg.     relabel Empty: MY_DISK
  632.         relabel df0: FISHMONGER
  633. ---------------------------------------------------------------------------
  634. RENAME source destination
  635.  
  636. * Renames the file or directory of name "source" to that of
  637.   "destination". You can use this to move files on a disk.
  638.  
  639. eg.     rename df0:c/list df0:ls        {moves and renames}
  640.         rename ed Editor                {just renames}
  641. ---------------------------------------------------------------------------
  642. RESIDENT [command1] [command2] ...
  643.  
  644. * RESIDENT allows you load commands into memory, such that they
  645.   will execute immediately, rather than be loaded from disk all the
  646.   time. The benefit of RESIDENT over saving commands on the RAM:
  647.   disk is that only one copy of the command is in memory all the
  648.   time. RAM: based commands will use up twice as much memory when
  649.   the command is being executed.
  650.  
  651. * The limitation of RESIDENT is that only certain commands will
  652.   work. Generally, all commands which have their PURE bit (see
  653.   PROTECT) set can be made RESIDENTABLE. However, RESIDENT
  654.   does not check whether the PURE bit is set before loading, and
  655.   hence you can try out commands to see if they work. They'll
  656.   always work the first time. Its only when executing the 2nd
  657.   time that the Amiga will likely crash.
  658.   Note: Crunched programs will most likely not work.
  659.  
  660. * Typing RESIDENT with no parameters will show the current list
  661.   of resident commands:
  662.     ADRESS is useful for programmers
  663.     USECOUNT says how many times it is used right now
  664.              ROM internal residents have negative values
  665.     NAME means the name  (hard to guess :)
  666.  
  667. * Typing one or more command names after RESIDENT will make those
  668.   commands resident. ZShell will search the command search path
  669.   to try and find them.
  670.  
  671. eg.     resident c/list c/cd c/date c/avail
  672.         resident ed
  673.  
  674. RESIDENT is compatible with the AmigaDOS Resident command.
  675. ---------------------------------------------------------------------------
  676. SEARCH file search_string
  677.  
  678. * SEARCH searches for the search_string in the file. The file can
  679.   be a binary (eg. executable) or a text. Each occurance
  680.   will be printed on the window with highlighted search_string.
  681.   If the file is a text, the whole line will be printed.
  682.   If it is a binary file, it will be printed from the occurance
  683.   to the next NULL or LF.
  684. * Searching is case independent (of course!).
  685. * To search for a string at the beginning of a line (textfile only)
  686.   put a point (.) before the search_string.
  687.  
  688. eg.     search zshell.doc "binary (eg."
  689.         search s:startup-sequence .assign
  690.           {show all assigns, but not "resident assign"}
  691.         search c:mount $ver:    {show version number and date,
  692.                             should work with all newer executables}
  693. ---------------------------------------------------------------------------
  694. SETDATE file|directory [date/time]
  695.  
  696. * SETDATE changes the date-of-last-change (DOLC) of a file or directory.
  697.   The DOLC can be shown by simply listing this file with LIST.
  698. * SETDATE with no date/time given sets the DOLC to the systemtime
  699.   (see DATE,SETCLOCK).
  700. * If you want to set the DOLC to a special date you have to specify
  701.   the date or time or both in a format described at DATE.
  702.  
  703. eg.     setdate ram:newthings
  704.         setdate devs:mountlist 21.8.71      {very old}
  705.         setdate murks 18:24:12 12-24-96     {future}
  706. ---------------------------------------------------------------------------
  707. TYPE source
  708.  
  709. * Prints to the screen the ASCII/ANSI text file specified as "source".
  710.   Hitting any key will pause the listing. Backspace will restart it.
  711.   CTRL-C will abort the listing.
  712. * Use MORE instead of TYPE, if possible.
  713.  
  714. eg.     type readme
  715. ---------------------------------------------------------------------------
  716. ###########################################################################
  717. ###########################################################################
  718. ###########################################################################
  719. ---------------------------------------------------------------------------
  720. Builtin Commands for Scripts and Controlling
  721.  
  722. Following there are descriptions of the other commands which are
  723. builtin in ZShell (and therefore need not be loaded from disk).
  724. Square brackets [] mean that the argument enclosed in is optional.
  725. A vertical bar | separates multiple possibilities, choose only one.
  726.  
  727. Alias  [variable] [definition]
  728. Ask  [question]
  729. Avail  [-C]
  730. Border  ON|OFF [number]
  731. Cls 
  732. Date  [hh:mm:ss|dd.mm.yy|mm-dd-yy]
  733. Echo  [string]
  734. Else 
  735. EndCLI  [-C]
  736. EndIf 
  737. Eval  expression
  738. Execute  source
  739. FailAt  [failat_level]
  740. Fault  [error_number]
  741. Help  [topic]
  742. If  [NOT][WARN][ERROR][FAIL][EXISTS file]
  743. Lab  label
  744. MemClk  ON|OFF|ALARM
  745. NewCLI  [-Wnew_window] [-Sstart_script] [-Ccommand]
  746. Path  [-C] [path1] [path2] [path3] [path4] ...
  747. Prompt  [string]
  748. Quit  [error_code]
  749. Review  [bytesize]
  750. Run  [-C] commandline
  751. SetClock  LOAD|SAVE
  752. Skip  label
  753. Stack  [size]
  754. UnAlias  [alias1] [alias2] [alias3] [alias4] ...
  755. Wait  timeout
  756. Comments 
  757. ---------------------------------------------------------------------------
  758. ALIAS [variable] [definition]
  759.  
  760. * ALIAS assigns a variable name to a definition. The variable name
  761.   can be up to 15 characters long, and the definition can be up to
  762.   about 360 (250) characters long.
  763.  
  764. * Function Keys
  765.   eg.   alias f1 "ed df0:s/startup-sequence^M"
  766.   This example assigns the unshifted F1 key to the text enclosed in
  767.   quotes. Note that the ^M characters puts an auto carriage return
  768.   in the definition.
  769.   eg.   alias F10 "cd df0:^M"
  770.   This sets shifted F10 to "cd df0:<CR>".
  771.  
  772.   Other egs.  alias f2 "cd df1:^M"
  773.               alias f4 "genim2 "
  774.               alias F9 "scribble df0:text/"
  775.               alias f1 "a68k z.a;blink z.o to z^M"
  776.  
  777. * The secondary use of ALIAS is to assign command aliases.
  778.   eg.   alias mv rename
  779.   This allows an alternate name for rename. i.e. mv.
  780.   So you could type
  781.         mv oldname newname      {to rename oldname to newname}
  782.  
  783.   eg.   alias as a68k
  784.         alias pp powerpacker
  785.         alias go "a68k zsh.s;blink zsh.o to zsh"
  786.         alias cped "copy df0:c/ed"
  787.   You would use this last alias, if you need to copy a particular
  788.   file a lot. So, to copy c/ed to ram: use:-
  789.         cped ram:
  790.  
  791. * You can also pass external parameters to an alias.
  792.   eg.   alias al  "%1 a68k $1.s;blink $1.o to $1"
  793.   Typing
  794.         al test
  795.   will assemble test.s using a68k, then blink test.o to become test.
  796.  
  797. You can specify upto eight parameters to pass to a command alias.
  798. At the start of the alias definition, specify the parameters to pass
  799. with the variables %0 thru %7. These need not be in sequence. The
  800. first %n will be assigned to the first parameter, the 2nd %n to
  801. the 2nd parameter etc.
  802. Insert the corresponding variables $0 thru $7 at the points in the
  803. alias definition where that parameter is to appear.
  804. eg.     alias disp "%1 %2 %3 echo \"$3 $2 $1\""
  805.         alias cram "%0 %1 %2 %3 copy $0 $1 $2 $3 ram:"
  806.         alias go "%5 %1 %6 %2 echo \"1st-$5 2nd-$1 3rd-$6 4th-$2\""
  807.  
  808. * Command aliases can be nested to 1 level.
  809.   eg.   alias clear "echo ^L";alias cdir "%1 clear;cd $1;dir"
  810.  
  811. * An important point about aliases, is that you can redefine the
  812.   existing internal command names.
  813.   eg.   alias help "type help_screen"
  814.   This would make it so that pressing HELP or typing H E L P would
  815.   not generate the standard help command list, but would type the
  816.   file called  help_screen to the screen. Similarly
  817.   eg.   alias copy c:copy       {replace copy by disk-based copy}
  818.         alias info c:dfree
  819.         alias assign .assign    {replace assign by disk-based assign}
  820.  
  821. * Typing ALIAS with no parameters at all, will generate a list of all
  822.   current alias definitions.
  823.   eg.   alias
  824.  
  825. * See UNALIAS for how to remove alias definitions.
  826. ---------------------------------------------------------------------------
  827. ASK [question]
  828.  
  829. * ASK prompts the user with a question requiring a Yes or No
  830.   answer. If the first letter of the users response is "Y", ASK
  831.   returns code WARN. Responding "E" returns ERROR, "F" returns
  832.   FAIL. Any other letter will result in return code OK.
  833.   The question can include ASCII characters as well as control
  834.   codes as per the ECHO command.
  835.  
  836. eg.     ask "Do you want commands copied to ram? "
  837.         if warn
  838.                copy c: ram:
  839.         endif
  840.  
  841. Note: You can redirect the ANSWER to a file by redirecting the OUTPUT.
  842. eg.     ask >ENV:CallIt        {The answer is written to CallIt}
  843. ---------------------------------------------------------------------------
  844. AVAIL [-C]
  845.  
  846. * AVAIL shows the available memory as:
  847.   1.Total chip memory free,
  848.   2.Total fast memory free,
  849.   3.Total memory free.
  850.  
  851. * With option "-c" given, it tries to free unused memory
  852.   (remove unused libraries, devices and the help manual)
  853.  
  854. eg.     avail
  855.         avail -c
  856. ---------------------------------------------------------------------------
  857. BORDER ON|OFF [number]
  858.  
  859. * Switches the border of the window on or off. If the border is off
  860.   there will fit some more characters in a line; this can be useful
  861.   when viewing texts with MORE.
  862. * If you run Kickstart 1.3, you should do a CLS or "echo ^L" after
  863.   using BORDER OFF.
  864. * If you specify a number after ON or OFF, the window is resized as
  865.   large as possible. The number means the wanted distance of the
  866.   window top to the screen top in pixels. By specifying a negative
  867.   value the window will just not hide the screens menu bar.
  868.  
  869. eg.     border off
  870.         border on 0         {fills full screen}
  871.         border off -1       {does not hide the menu bar}
  872.         border on 10;cls    {with KS 1.3}
  873. ---------------------------------------------------------------------------
  874. CLS
  875.  
  876. * CLS clears the window.
  877.   It also resets the consolehandler, so if you see lots of funny
  878.   characters on the window, try CLS.
  879. * You can do the same by using "echo ^[c".
  880. * CTRL L only clears the window (same as "echo ^L").
  881.  
  882. eg.     cls
  883. ---------------------------------------------------------------------------
  884. DATE [hh:mm:ss|dd.mm.yy|mm-dd-yy]
  885.  
  886. * DATE without arguments shows the actual date and time (systemtime).
  887. * You can specify one or two arguments to set date or time or both.
  888.   The time format must be in HOUR:MINUTE:SECOND . Do not forget the
  889.   colon (:) between. Give only one or two digit numbers.
  890.   There exists two formats for setting the date. First is
  891.   DAY.MONTH.YEAR . Second is MONTH-DAY-YEAR . Use only one or two
  892.   digit numbers.
  893.  
  894. eg.     date
  895.         date 14:15:00         {quarter past two PM}
  896.         date 12.5.94          {12th of May in 1994}
  897.         date 3-30-88 8:12:45  {30th of March in 1988 in the morning}
  898. ---------------------------------------------------------------------------
  899. ECHO [string]
  900.  
  901. * Prints the "string" to the screen. If you want spaces in the
  902.   string, make sure the whole string is enclosed in quotes. If you
  903.   want to print special control characters (eg. ctrl-L clear screen)
  904.   then prefix the control letter with a ^ character. If you want to
  905.   print double quotes, then use the \ character before the qoutes.
  906.   If you want to print some special characters like the CSI ($9B),
  907.   you can put a (hexa-)decimal number after the ^ character; you can
  908.   separate it from the next character by a point (.) . Do not forget
  909.   the ^J at the end of a line.
  910.  
  911. eg.     echo hello^J
  912.         echo "Hello world !"
  913.         echo Hello world !
  914.         echo "^Lthe screen was just cleared^J"
  915.         echo "^Lline 1^Jline 2^Jline 3^J"
  916.         echo "these are double quotes ->\"^J"
  917.         echo ^$9b.33mColor^$9b.32mful^J
  918.         echo ^$9b.4mUnderlined^$9b.0mNormal^J
  919.  
  920. * Some common control codes are:
  921.   ^7    ^G      bell (makes a DisplayBeep)
  922.   ^10   ^J      linefeed.
  923.   ^12   ^L      clear screen.
  924.   ^13   ^M      carriage return.
  925.   ^24   ^X      clear line.
  926.   ^27   ^[      escape.
  927.   ^$9b          CSI (command sequence introducer).
  928. ---------------------------------------------------------------------------
  929. ELSE
  930.  
  931. * ELSE marks the middle of an IF statement. All statements
  932.   following it, and before the ENDIF statement will be executed
  933.   only if the IF condition is FALSE. See IF for usage.
  934. ---------------------------------------------------------------------------
  935. ENDCLI [-C]
  936.  
  937. * Exits you from ZShell back to the AmigaDOS CLI prompt or Workbench.
  938. * If the option "-c" was specified, it will clear ZShell as a
  939.   resident: only in low memory situations needed.
  940. * Instead of using ENDCLI you can simply press the ESC key or click
  941.   on the close gadget, if available.
  942.  
  943. eg.   endcli
  944.       endcli -c
  945. ---------------------------------------------------------------------------
  946. ENDIF
  947.  
  948. * ENDIF marks the end of an IF statement. See IF for usage.
  949. ---------------------------------------------------------------------------
  950. EVAL expression
  951.  
  952. * EVAL evaluates the "expression" as a reverse polish expression,
  953.   and displays the answer in decimal and hex notation. Reverse
  954.   Polish Notation (RPN) is used in Forth and in Hewlett Packard
  955.   calculators (the best calculators in the world). It is based on
  956.   how arithmetic is actually done at the lowest possible level.
  957.   RPN allows calculating complex expressions without using brackets.
  958.  
  959. eg.     eval 4 5 +
  960.   This gives the answer 9. When a number is found, it is "pushed"
  961.   onto the arithmetic stack. The + always adds the last two numbers
  962.   on the stack.
  963.  
  964. eg.     eval 7 2 3 + -
  965.   This gives the answer 2. It is the same as (7 - (2 + 3)). See,
  966.   7 is first pushed onto the stack, followed by 2, then 3. The +
  967.   adds together the 2 and 3 and leaves the result 5 on the stack.
  968.   Which means that the number 7 followed by 5 are left on the
  969.   stack. The - subtracts the last entry (5) on the stack from the
  970.   one before it (7), leaving the result 2.
  971.  
  972. eg.     12 * (3 + 9)                    > eval 12 3 9 + *
  973.         (15 - 4) * (6 + 18)             > eval 15 4 - 6 18 + *
  974.         (6 * ((87 + 13) / (2 * 25)))    > eval 6 87 13 + 2 25 * / *
  975.  
  976. * EVAL only performs 32 bit integer arithmetic.
  977.   Negative numbers are prefixed with - .(hexadecimal they are
  978.   shown as a 31 bit integer with bit 32 set, as usual)
  979.   Prefixing positive numbers with + is optional.
  980.  
  981. eg.     eval +5 -3 +    {results in 2  hex:$00000002}
  982.         eval -5 3 +     {results in -2 hex:$fffffffe}
  983.  
  984. * EVAL supports decimal, hexadecimal and binary  numbers.
  985.   If you prefix the number with $, the number is hex
  986.   If you prefix the number with %, it is binary.
  987. Programmers: For BPTR-APTR conversion you can use & to specify
  988.   a hexadecimal APTR when asked for a BPTR and vice versa with §.
  989. eg.     eval $c00000 $a0 16 * +
  990.  
  991. * EVAL can also be used to perform base conversions (to dec or hex)
  992. eg.     eval $ca
  993.         eval %10110001
  994.         eval 45
  995.         eval &5a8
  996.  
  997. * The operators + - * / & | @ ! are supported.
  998.   The & allows logical AND'ing. And | allows logical OR'ing.
  999.   The @ is similar to PEEK in BASIC.
  1000.   Conversely, ! is similar to POKE in BASIC
  1001. eg.     eval $80 $21 $08 | | $aa &
  1002.         eval $67 %11001011 &
  1003.  
  1004.         eval $c00000 @
  1005.   This prints out the long word in memory locations $c00000 - $c00003.
  1006.  
  1007.         eval $aa55aa55aa $40000 !
  1008.   This pokes the long word $aa55aa55aa into locations $40000 thru $40003.
  1009.  
  1010. * For environment handling you can specify the value of an
  1011.   environment variable with | followed by the name.
  1012.   To store the result in a variable, redirect the output.
  1013.  
  1014. eg.     eval >ENV:aa |ENV:bb 1 +
  1015.   This adds 1 to the value in ENV:bb and stores the result in ENV:aa
  1016. * If the result was 0 an error (fail-level 10) will be returned.
  1017.   If it was negative, a warn (5) returns. (Not when redirecting output)
  1018. ---------------------------------------------------------------------------
  1019. EXECUTE source
  1020.  
  1021. * Executes the ZShell script file of name "source". All ZShell
  1022.   commands, as well as commands from disk are valid within a
  1023.   script file.
  1024. * If the S-protection-bit (see PROTECT) of "source" is set, you do
  1025.   not need to type EXECUTE, just use "source" like a command.
  1026. * You can break scripts by pressing CTRL-D.
  1027.  
  1028. eg.   execute install_hard_disk
  1029. ---------------------------------------------------------------------------
  1030. FAILAT [failat_level]
  1031.  
  1032. * FAILAT sets the error code level at which scripts (and multiple
  1033.   commands on one line) will be aborted. The default level is 10.
  1034.   Most commands return 10 as an error, (20 for serious errors)
  1035.   while compilers returning Warning type errors will return 5.
  1036.   Hence, the default of 10 will allow Warnings to occur without
  1037.   the script (or line) being aborted. If a command returned an error
  1038.   code higher than the failat level, it will be printed out on the
  1039.   window.
  1040.  
  1041. eg.     failat 20       {sets failat level to 20}
  1042.  
  1043. * If you do not specify a failat level, the current setting is
  1044.   shown.
  1045.  
  1046. eg.     failat
  1047. ---------------------------------------------------------------------------
  1048. FAULT [error_number]
  1049.  
  1050. * FAULT displays a textual error message of the given DOS-error-number
  1051.  
  1052. eg.     fault 103
  1053.   {says something like "no free store", go and buy some extra memory :-)
  1054. ---------------------------------------------------------------------------
  1055. HELP [topic]
  1056.  
  1057. * HELP shows the lines of this manual corresponding to the topic.
  1058.   To see all topics available, type "HELP CONTENTS" . Make sure that
  1059.   the manual "ZShell.doc" is in your command search path!
  1060.   For some help about a command you can also type "commandname ?" .
  1061.   Type only "?" to read the manual with MORE.
  1062. Note: Instead of typing the topic you can only type some starting
  1063.       characters.
  1064. Note: The manual is only loaded once and will stay in memory till
  1065.       you use AVAIL -C or ENDCLI -C
  1066.  
  1067. eg.    help contents       {"help cont" will do the same}
  1068.        help copy
  1069.        makedir ?
  1070.        ?
  1071.  
  1072. * HELP without a topic lists the names of all available ZShell
  1073.   commands to the screen. This does not need the manual.
  1074.   HELP can also be invoked by hitting the HELP key.
  1075.  
  1076. eg.   help
  1077. ---------------------------------------------------------------------------
  1078. IF [NOT][WARN][ERROR][FAIL][EXISTS file]
  1079.  
  1080. * The IF command allows conditional execution of statements
  1081.   following it.
  1082. * If the condition specified is true, then execution continues
  1083.   after the IF statement until either an ENDIF or ELSE statement
  1084.   is encountered. If it is an ELSE statement, then all statements
  1085.   between the ELSE and the closing ENDIF are skipped.
  1086. * If the condition is false, then all statements after the IF and
  1087.   before either an ENDIF or ELSE statement are skipped. If an ELSE
  1088.   is encountered, then execution continues for all statements after
  1089.   the ELSE and before the closing ENDIF.
  1090. * IF can examine the state of the return code from the last command
  1091.   execute with WARN, ERROR, and FAIL tests. You can test for the
  1092.   non existence of such a state by including the optional NOT
  1093.   parameter.
  1094.  
  1095. eg.     IF WARN
  1096.            echo "last command returned warnings"
  1097.         ELSE
  1098.            echo "last command did not return warnings"
  1099.         ENDIF
  1100.  
  1101.         IF NOT FAIL
  1102.            echo "last command did not fail"
  1103.         ENDIF
  1104.  
  1105. * IF can also test for the existence of a file or directory.
  1106.  
  1107. eg.     IF EXISTS :system/format
  1108.            echo "this disk has a format command"
  1109.            echo "you can look yourself. I'm not joking"
  1110.         ENDIF
  1111.  
  1112.         IF NOT EXISTS ram:ed
  1113.            copy c:ed ram:
  1114.         ENDIF
  1115. ---------------------------------------------------------------------------
  1116. LAB label
  1117.  
  1118. * LAB specifies a destination (label) for the SKIP command.
  1119. ---------------------------------------------------------------------------
  1120. MEMCLK ON|OFF|ALARM
  1121.  
  1122. * MEMCLK is for using a clock shown in the border of the actual
  1123.   window. The current total free and chip free memory are also
  1124.   shown. It can do a DisplayBeep (short flash on all screens) at a
  1125.   specified time. The DisplayBeep can be converted into a sound
  1126.   by using a PD-utility for that or using Workbench 2.1+ .
  1127. * Programmers: There will be only one "MemClock"-Task, even if you
  1128.   run MEMCLK on many windows  -> memory and CPU saving.
  1129. * MEMCLK ON switches the clock on or does nothing if it already
  1130.   exist.
  1131. * MEMCLK OFF switches the clock off or does nothing if it does not
  1132.   exist.
  1133. * MEMCLK ALARM shows the alarm time. If you type a time (see DATE)
  1134.   after ALARM, you set the alarm time. (You cannot set an alarm date
  1135.   or multiple times.) ( MEMCLK A is the same as MEMCLK ALARM )
  1136.  
  1137. eg.     memclk on
  1138.         memclk off
  1139.         memclk alarm
  1140.         memclk a 21:34:07
  1141.  
  1142. * The clock can also be used on non-ZShell windows, but MAKE SURE
  1143.   that the clock is switched OFF BEFORE the window is CLOSED,
  1144.   otherwise you will see THE GURU (or an ALERT with KS2.0+)
  1145.   For example, to get a clock on the Workbench, type in ZShell
  1146.         wait 5;memclk on
  1147.   and press RETURN. Now you have 5 seconds to click on the Workbench
  1148.   screen. For removing use "wait 5;memclk off" .
  1149. ---------------------------------------------------------------------------
  1150. NEWCLI [-Wnew_window] [-Sstart_script] [-Ccommand]
  1151.  
  1152. * NEWCLI without arguments starts a new ZShell process.
  1153.   Things like paths, aliases and history buffer (!) will be copied to
  1154.   the new ZShell. The input/output window is created with the default
  1155.   specification. The startup script will be S:ZStart.
  1156. * "NEWCLI -Wnew_window" is used for opening a window with different
  1157.   specifications than the default. If you specify just "-W",
  1158.   there will be no window and output will be send to NIL: ; if there
  1159.   is input necessary, the ZShell process will just end (for
  1160.   example at a end of a script).
  1161. * "NEWCLI -Sstart_script" is used if the name of the startup script
  1162.   should be different from S:ZStart. If you specify just "-S", no
  1163.   script will executed.
  1164. * "NEWCLI -Ccommand" executes the command when starting. No script
  1165.   will be executed.
  1166.  
  1167. eg.     newcli
  1168.         newcli -wcon:30/30/400/50/Shell
  1169.         newcli -wcon:50/20/500/100/Hello -ss:shell-startup
  1170.         newcli -sram:doassigns -w
  1171.         newcli "-wcon:30/30/400/50/Great Shell" "-cecho Welcome !"
  1172. ---------------------------------------------------------------------------
  1173. PATH [-C] [path1] [path2] [path3] [path4] ...
  1174.  
  1175. * PATH defines the command search path used by ZShell when searching
  1176.   for disk based commands (see EXECUTING COMMANDS) .
  1177.   If you give the "-c" option, the old search path will be cleared
  1178.   and the new search path consist only of the given paths.
  1179.  
  1180. eg.     path -c c: ram:c df0: df1:
  1181.   This example will make it so that if you type a command which is
  1182.   not internal in ZShell, the resident list will be searched for it,
  1183.   then the current directory, then the c: directory, then the ram:c
  1184.   directory, then df0:, and finally df1:
  1185.  
  1186. * By omitting the -c option, you can add a number of paths onto the
  1187.   existing command search path.
  1188.  
  1189. eg.     path df2:c
  1190.   Adds the directory df2:c onto the existing command search path.
  1191.  
  1192. eg.     path df1:bin df1:myprogs
  1193.   Adds the two directories df1:bin and df1:myprogs onto the existing
  1194.   command search path.
  1195.  
  1196. * If, however, you type path with no parameters, the current search
  1197.   path will be displayed.
  1198.  
  1199. PATH is not yet compatible to the AmigaDOS Path command. Sorry.
  1200. ---------------------------------------------------------------------------
  1201. PROMPT [string]
  1202.  
  1203. * If no parameter is typed, the current prompt setting will be shown.
  1204.  
  1205. eg.     prompt
  1206.  
  1207. * If a prompt string is specified, the current prompt setting
  1208.   will be changed to that string. The character "%" specifies a
  1209.   special prompt option:
  1210.     %p      Insert whole path of current directory.
  1211.     %s      Insert last part of the path of current directory.
  1212.     %n      Insert CLI number
  1213.     %l      Insert current input line number (for fun!)
  1214.     %c      Insert last command (for even more fun ! :-)
  1215.  
  1216. eg.   prompt "%s> "     {default prompt. Show current directory + ">"}
  1217.       prompt "%n.%p> "  {show CLI number, then current dir, then ">"}
  1218.       prompt "Hello ."  {shows "Hello ." at the start of every line}
  1219. ---------------------------------------------------------------------------
  1220. QUIT [error_code]
  1221.  
  1222. * QUIT forces a script file to end, and return to the shell.
  1223.   An optional error code can be passed back (ie. 5=WARN 10=ERROR
  1224.   15=BAD 20=FAIL etc).
  1225.  
  1226. eg.     quit 5
  1227.         quit
  1228. ---------------------------------------------------------------------------
  1229. REVIEW [bytesize]
  1230.  
  1231. With the reviewbuffer you can see that again what scrolled out of the
  1232. window or was redirected. In the reviewbuffer are all outputs stored.
  1233. To see what is in the reviewbuffer just press SHIFT TAB. This activates
  1234. the MORE text reader.
  1235. * "REVIEW bytesize" (re)creates a reviewbuffer with the given size.
  1236.   Can also be used to clear the buffer.
  1237. * "REVIEW 0" removes the reviewbuffer.
  1238. * "REVIEW" without arguments shows the adress and size of the current
  1239.   reviewbuffer.
  1240. * "REVIEW S filename" saves the reviewbuffer to that file.
  1241.  
  1242. eg.     review 10000        {starts normal reviewbuffer}
  1243.         review 50000        {starts big reviewbuffer}
  1244.         review 0            {deletes reviewbuffer}
  1245.  
  1246. NOTE 1: Because it uses a circular buffer with fixed size, this is much
  1247.   faster than having a fixed number of lines. The decrease in scrolling
  1248.   speed is neglible.
  1249. NOTE 2: The Write function of the dos.library will be patched, so
  1250.   there might be problems with other programms that patch this too.
  1251. ---------------------------------------------------------------------------
  1252. RUN [-C] commandline
  1253.  
  1254. * RUN executes a commandline in a separate process. If you want to
  1255.   execute several commands, you can separate them with \; .
  1256. * If you do not need a window, you can specify the "-C" option.
  1257.  
  1258. eg.     run dir ram:
  1259.         run -c assign libs: df0:libs
  1260. ---------------------------------------------------------------------------
  1261. SETCLOCK LOAD|SAVE
  1262.  
  1263. * SETCLOCK only works if you have a battery backed up clock (BBUC).
  1264.   It accesses the adresses $DC0000 and I do not know if it works
  1265.   with very old or very new (A1200) clocks.
  1266. * SETCLOCK LOAD sets the systemtime (you can see the systemtime with
  1267.   DATE or MEMCLK) to the time in the BBUC (hopefully this is the
  1268.   right time).
  1269. * SETCLOCK SAVE first resets the BBUC, then stores the systemtime
  1270.   to the BBUC.
  1271.   To set the BBUC to the right time, use DATE to set the correct
  1272.   date and time, then use SETCLOCK SAVE.
  1273.  
  1274. eg.     setclock load
  1275.         setclock save
  1276. ---------------------------------------------------------------------------
  1277. SKIP label
  1278.  
  1279. * SKIP searches for the label within the current script file. If it
  1280.   finds it, execution continues from that point onwards. Labels
  1281.   are specified using the LAB command.
  1282.  
  1283. eg.     lab myloop
  1284.         dir ram:
  1285.         ask "list ram again? "
  1286.         if warn
  1287.            skip myloop
  1288.         endif
  1289. ---------------------------------------------------------------------------
  1290. STACK [size]
  1291.  
  1292. * Allows you to view or alter the current stack size.
  1293.  
  1294. eg.     stack            {shows the current stack size}
  1295.         stack 30000      {sets current stack = 30000 bytes}
  1296. ---------------------------------------------------------------------------
  1297. UNALIAS [alias1] [alias2] [alias3] [alias4] ...
  1298.  
  1299. * UNALIAS removes one or more alias definitions from the alias list.
  1300.  
  1301. eg.     alias f1 "cd df0:;dir^M"
  1302.         alias f2 "cd df1:;dir^M"
  1303.         ...
  1304.         alias f10 "ed df1:s/startup-sequence^M"
  1305.  
  1306.         unalias f1 f2 f3 f4 f5 f6 f7 f8 f9
  1307.         ...
  1308.         unalias f10
  1309. ---------------------------------------------------------------------------
  1310. WAIT timeout
  1311.  
  1312. * WAIT halts processing for the time given. Timeout is in seconds.
  1313.   You can abort this with CTRL-C.
  1314.  
  1315. eg.     echo "I'll wait a minute"
  1316.         wait 60
  1317. ---------------------------------------------------------------------------
  1318. Comments
  1319.  
  1320. ; blah blah blah blah
  1321. * etc etc etc
  1322. # hello ma
  1323.  
  1324. * Placing a semi-colon, an asterisk or a hash character as the 1st
  1325.   character in the line of a script file allows you to place comments
  1326.   in it.
  1327.  
  1328. eg.   ; This is a comment line
  1329.  
  1330. * If you want to place a comment at the end of a line, you have to
  1331.   put ;# before it.
  1332.  
  1333. eg.   info;#to see something interesting
  1334. ---------------------------------------------------------------------------
  1335. ###########################################################################
  1336. ###########################################################################
  1337. ###########################################################################
  1338. ---------------------------------------------------------------------------
  1339. Builtin Commands for Advanced Users
  1340.  
  1341. These commands are thought for users with a deeper knowledge of the
  1342. system. Maybe they are also useful for those not knowing of the system
  1343. internals (like beginners). Just try the examples to find that out.
  1344.  
  1345. Break  task_description [signalmask|C|D|E|F]
  1346. Check  ON|OFF
  1347. Ctrl  [max_16_chars | -C [ignore_name] | -R 8_colour_digits]
  1348. DiskChange  device
  1349. Die  device
  1350. GetMsg  [portname]
  1351. Locate  [-C] lock|filename
  1352.  [start_address] [end_address]
  1353. PutMsg  port_description [number1|string1] [number2|string2] ...
  1354. Recopy  [-R] [directory|file_description]
  1355. Reset 
  1356. Show  D|I|L|M|P|R|S|T
  1357. Strings  sourcefile [count]
  1358. TaskPri  priority [task_description]
  1359. Vec 
  1360. ---------------------------------------------------------------------------
  1361. BREAK task_description [signalmask|C|D|E|F]
  1362.  
  1363. * BREAK sets some signals at a given task
  1364. * task_description can be one of:
  1365.   - task/process name (case dependent !)
  1366.   - task/process adress
  1367.   - CLI-process number (one from 1 to 20)
  1368.   - zero (0) for this task
  1369.   It will be checked if the node-type field contains TASK or PROCESS
  1370. * signalmask is a longword; all bits, which should be signalled,
  1371.   must be 1 . Alternatively you can specify c,d,e or f to set
  1372.   the according signal to CTRL-C,-D,-E or -F. (CTRL-C is bit 12)
  1373. * BREAK without signalmask (and c,d,e,f) given sets all signals the
  1374.   task is waiting for.
  1375.  
  1376. eg.     break RexxMaster    {and it will be gone...}
  1377.         break Exchange c    {Exchange will get itself off too}
  1378.  
  1379. eg. If 2 ZShells are running. The one with the CLI-number 1 (get that
  1380.     out with prompt %n) lists a very large directory. You can break
  1381.     that by using the other ZShell typing:
  1382.         break 1 c
  1383.     Thats the same like you pressed CTRL-C on the ZShell number 1.
  1384. ---------------------------------------------------------------------------
  1385. CHECK ON|OFF
  1386.  
  1387. * Activates or deactivates the programmers status line.
  1388.  
  1389. eg.     check on        {activates status line}
  1390.         check off       {deactivates status line}
  1391.  
  1392. The status line (if activated) will only appear once a disk based
  1393. or resident program has been executed. The line appears as follows:
  1394.  
  1395. Result2: 0  time = 00:00:23.66  changes-> chip: 0  fast: 0  total: 0
  1396.  
  1397. Result2 shows the error code that can be asked for with IoErr.
  1398. Time shows how long the program took to execute in hours,
  1399. minutes, seconds, hundredths (This time does NOT include the time
  1400. it takes to load the program from disk). Changes show if the program
  1401. has left any memory still allocated. i.e. if 200 bytes of chip
  1402. memory were left allocated by the program, then you see "chip: -200".
  1403. The Return code (the program returns in D0) is shown as Fail-Level.
  1404. ---------------------------------------------------------------------------
  1405. CTRL [max_16_chars | -C [ignore_name] | -R 8_colour_digits]
  1406.  
  1407. This command is for changing the default settings.
  1408. * CTRL is for command-line-editing-keys-definitions (great word :).
  1409.   In other words: You can change the meaning of keys pressed with
  1410.   CTRL (Control) and some other keys (TAB ^I, Backspace ^H,
  1411.   Return ^M, Shift-Return ^J, ESC ^[).
  1412. * "CTRL" without arguments shows the current definitions.
  1413. eg.     ctrl
  1414.  
  1415. * "CTRL WQSEIX[RYHJMLAVn" (case dependent) sets the default settings.
  1416.   To change something, just change the character corresponding to
  1417.   the key pressed with CTRL. See some lines above for some CTRL-
  1418.   equivalents ( eg. TAB is same as CTRL-I ).
  1419.   You may get confused if you define one key twice.
  1420. eg.     ctrl QWKU         {half line deleting like KS2.0 shell}
  1421.         ctrl QWSEAXTIYMJH {...and you will have lots of fun}
  1422.  
  1423. * There is a special meaning with the 16th character. This is by
  1424.   default the point (.), which is displayed as a "n" (don't get
  1425.   confused). The point has a special meaning in some commands
  1426.   (ECHO,SEARCH,PUTMSG, dir back, force disk, abbreviation)
  1427.   and can be redefined using "CTRL WQSEIX[RYHJMLAVn", but replace the
  1428.   point by the character desired. The ASCII code must be between
  1429.   32 and 64.
  1430. eg.     ctrl WQSEIX[RYHJMLAV#  {# is now a special character}
  1431.  
  1432. * "CTRL -C" shows the ignored filenames for filenamecompletion.
  1433.   By default this is unset. (-C means here -Complete)
  1434. * "CTRL -C filedescription" defines which names are not completed.
  1435.   "filedescription" contains wild card(s) in most cases.
  1436. eg.     ctrl -c         {display ignore_name}
  1437.         ctrl -c *.info  {ignore *.info-files}
  1438.         ctrl -c *.info|*.bak {ignore files ending in .info and .bak}
  1439.         ctrl -c ~*.tex|*.dvi {complete only *.tex and *.dvi-files}
  1440.         ctrl -c ""      {unset ignore_name}
  1441.  
  1442. * "CTRL -R colours" defines the use of colours. "colours" has to be a
  1443.   8 digit number. The digit at position x defines to what colour number
  1444.   the default colour x is mapped to. Everything clear ? (I think no!)
  1445. eg.     ctrl -r 01234567   {sets the default colours}
  1446.         ctrl -r 01111111   {switches to one colour mode, very useful with
  1447.                             OS3.0+ to speed up scrolling}
  1448.         ctrl -r 01233321   {if you want to use only 4 colours}
  1449. ---------------------------------------------------------------------------
  1450. DISKCHANGE device
  1451.  
  1452. * Needed for devices which do not detect a diskchange.
  1453.  
  1454. eg.     mount rad:;diskchange rad:
  1455.   Makes your rad:-disk appear on the Workbench.
  1456.         diskchange ram:
  1457.   If the ram-disk does not exist yet, the handler will be started
  1458.   (and the ram-disk can appear on Workbench when done before LOADWB)
  1459. ---------------------------------------------------------------------------
  1460. DIE device
  1461.  
  1462. * DIE lets the handler of a device end itself.
  1463.   It seems not to work with most handlers.
  1464. ---------------------------------------------------------------------------
  1465. GETMSG [portname]
  1466.  
  1467. * GETMSG waits for a message arriving at the process-internal
  1468.   messageport (pr_MsgPort). The message will be shown, strings
  1469.   will be tried to detected (this could cause lots of enforcer hits).
  1470.   Then you will be asked if to reply the message. "y" replies it
  1471.   and should be used normally. "e" replies and gets back to waiting
  1472.   mode again. Abort waiting is possible with CTRL-C.
  1473. * "GETMSG portname" gives the process-internal port the given name.
  1474.   Then it behaves as described above.
  1475. * See PUTMSG for examples.
  1476. ---------------------------------------------------------------------------
  1477. LOCATE [-C] lock|filename
  1478.  
  1479. * "LOCATE lockadress" (lockadress is a BPTR) shows information about
  1480.   that lock structure. fl_Access must be -1 (write) or -2 (read).
  1481. * "LOCATE filename_or_dirname" gets an ACCESS_READ lock structure on
  1482.   that file/dir. (If you type -1 after the filename you should get
  1483.   an ACCESS_WRITE lock, but there seems to be an error in DOS !)
  1484. * "LOCATE -C lockadress" unlocks (removes) the lock structure.
  1485.  
  1486. eg.     locate &21f45c      {shows lock on adress $21f45c}
  1487.         locate $9f5b7       {shows lock with BPTR $9f5b7}
  1488.         locate -c $9f5b7    {removes this lock}
  1489.         locate ram:rdit     {tries to read-lock ram:rdit}
  1490.         locate ram:rdit -2  {same as above}
  1491.         locate c:mount -1   {got a write-lock on c:mount ?}
  1492. ---------------------------------------------------------------------------
  1493. M [start_address] [end_address]
  1494.  
  1495. * M is a memory contents dumping command.
  1496. * Typing M with a start and end address will display the hex and
  1497.   ASCII contents of those bytes in the memory locations specified.
  1498. * Typing M with only a start address will display 160 bytes
  1499.   starting at the location specified.
  1500. * Typing M with no parameters will display 160 bytes starting
  1501.   from the current memory location.
  1502. * The current memory location is always one location higher than
  1503.   the last location shown by a prior M command.
  1504.  
  1505. eg.   m $70000 $77fff
  1506.       m $fc0000
  1507.       m
  1508. ---------------------------------------------------------------------------
  1509. PUTMSG port_description [number1|string1] [number2|string2] ...
  1510.  
  1511. * PUTMSG is useful for testing programms which wait for a message,
  1512.   or to reactivate a task that waits for a message which will never
  1513.   arrive. PUTMSG sends a message to the given messageport.
  1514. * port_description can be given in 5 (!) ways:
  1515.   - Name of the messageport
  1516.   - Adress of the messageport
  1517.   - 3 ways of a task_description, see BREAK. This MUST be a Process
  1518.     because the process-internal messageport will be used.
  1519. * number|string is a longword number or a string. If it is a number,
  1520.   it will just be added to the message. If it is a string, a
  1521.   adress pointing to this string will be added to the message.
  1522.   If number1|string1 was a point (.), the message will be initialized
  1523.   as an DOS-Packet.
  1524. * After sending the message PUTMSG will wait for the reply and show
  1525.   that reply like GETMSG. Abort waiting with CTRL-C.
  1526. WARNING: Your machine might CRASH if you send a message to a
  1527.   (Process-internal) port that is not waiting for this message.
  1528. NOTE: PUTMSG without arguments makes a DisplayBeep (even without a
  1529.   window) and outputs the internal register value of A5.
  1530.  
  1531. eg.     putmsg testtask $21fd68 12
  1532.         putmsg testport "Hello World!"
  1533.  
  1534.   If you have 2 ZShells, execute in the one with CLI-number 1
  1535.   "getmsg". Activate the other shell and type
  1536.         putmsg 1 "like some chatting ?"
  1537.   The ZShell no. 1 should display that and prompt "reply ?". Answer
  1538.   "y" and the message goes back again.
  1539.   Now try "getmsg wurgutz" at one ZShell and "putmsg wurgutz $abcd"
  1540.   on the other. Do not forget to reply.
  1541.  
  1542. * You can use PUTMSG to use the AREXX interface of a programm. This
  1543.   works with some programms even with Kick 1.3 and no AREXX-Package.
  1544. eg.     putmsg showdvi 0 0 0 0 0 "tofront" {gets ShowDVI to front}
  1545.   Instead of the first 0 you sometimes must write the adress of
  1546.   this task. If available replace the second 0 with a pointer to
  1547.   the rexxsyslib.library. The third 0 is called rm_Action. I do not
  1548.   know what it is for. The fourth and fifth are results, only
  1549.   interesting in the reply.
  1550. eg.     putmsg showdvi 0 0 0 0 0 "loadnew tex.dvi"
  1551.  
  1552. * Specify a point as first number if you want to send a DOS-Packet.
  1553. eg.     putmsg DF0 . 0 1023 0 0 -1     {same as LOCK DF0: ON}
  1554.   If you get $FFFFFFFF as 4th longword, it was successful.
  1555.  (with Kick 1.3 you need to use FileSystem instead of DF0)
  1556. ---------------------------------------------------------------------------
  1557. RECOPY [-R] [directory|file_description]
  1558.  
  1559. * RECOPY copies a file to the same directory with a slight different
  1560.   name (new file), then deletes the old file and renames the
  1561.   new file like the old file was called. After that the new file
  1562.   is the same as the old file was (date and comment are copied too).
  1563.   You might say: What is the use of that ? - Answer: You can process
  1564.   lots of files with a LoadSeg patch or a patch at the device.
  1565.   Depending on the patch it sometimes would be a good idea to run a
  1566.   diskoptimizer after RECOPYing.
  1567.  
  1568. * In other words: Put some powerpacked textfiles in RAM: then run the
  1569.   PowerPackerPatcher (from Nico Francois), then do "RECOPY RAM:".
  1570.   After that these textfiles should be unpacked.
  1571.   Similarly you can crunch whole disks (in DF0:) running a stacker-
  1572.   like programm on DF0: then doing "RECOPY -R DF0:". This is tested
  1573.   with EPU and might also work with XFH (from the XPK-Package).
  1574.  
  1575. * The option -R (recursive) does the same as in LIST.
  1576. * If no directory is specified, the current directory is taken.
  1577. * If you want to give a file_description make sure that it contains
  1578.   at least one wild card. For specifying a single file put a "|"
  1579.   (vertical line) behind it.
  1580.  
  1581. eg.     recopy -r
  1582.         recopy ram:~*.info      {do not RECOPY .info-files}
  1583.         recopy ram:bigdoc|      {RECOPY only the file bigdoc}
  1584. ---------------------------------------------------------------------------
  1585. RESET
  1586.  
  1587. * Performs a COLD reset of your Amiga. i.e. RAD will go, and you
  1588.   will get back fast memory that may have been disabled. And viruses
  1589.   should disappear.
  1590.   You will be asked before resetting.
  1591.  
  1592. eg.     reset
  1593. ---------------------------------------------------------------------------
  1594. SHOW D|I|L|M|P|R|S|T
  1595.  
  1596. * Shows some information about important exec-lists:
  1597.   - Devices
  1598.   - Interrupts
  1599.   - Libraries
  1600.   - Memory
  1601.   - Ports (MessagePorts)
  1602.   - Resources
  1603.   - Semaphores
  1604.   - Tasks (and Processes)
  1605.   Use the first character of one of them as argument.
  1606. * The output means:
  1607.   - Adress: hexadecimal start adress of the structure
  1608.   - Pri   : Priority, often unused
  1609.   - Ver   : Number of version  (only with D,L,R)
  1610.   - Rev   : Number of revision (only with D,L,R)
  1611.   - Name  : Name
  1612.   - State : Task state (only with T)
  1613.   - SignWait : Signals, a waiting task waits for (only with T)
  1614.   - PT    : Pr means Process, Ta means Task, Tm means Task with
  1615.             Messageport like Process     (only with T)
  1616. * If displaying the tasklist, the CLI-number (-> CLI ?:) and the
  1617.   loaded command will be shown at processes with cli-structure.
  1618.  
  1619. eg.     show d          {have a look at the device-list}
  1620.         show Devices    {same as above}
  1621.         show t          {This is REAL MULTITASKING ! :) }
  1622. ---------------------------------------------------------------------------
  1623. STRINGS sourcefile [count]
  1624.  
  1625. * STRINGS displays all valid ASCII strings in a file which have a
  1626.   length greater than or equal to the count. If no count is given,
  1627.   a default of 10 characters is used.
  1628. * This command is very useful for finding out which libraries a
  1629.   program uses.
  1630.  
  1631. eg.     strings c:zshell 20
  1632.         strings c:mount
  1633. ---------------------------------------------------------------------------
  1634. TASKPRI priority [task_description]
  1635.  
  1636. * TASKPRI sets the priority of a task, it can be displayed using
  1637.   "SHOW T". The priority must be between -127 and 128 and should
  1638.   be within -50 and 20 to avoid system-hangups. Standard is 0 .
  1639. * task_description is same as described at BREAK.
  1640. * With one argument TASKPRI sets the priority of this task.
  1641. * If task_description is given, TASKPRI sets the priority of the
  1642.   given task.
  1643. NOTE: I did not like to call this command CHANGETASKPRI, because
  1644.       this name is really too long.
  1645.  
  1646. eg.     taskpri 2       {This task will be preferred}
  1647.         taskpri -1 3    {affects CLI no. 3}
  1648.         taskpri 4 Workbench
  1649. ---------------------------------------------------------------------------
  1650. VEC
  1651.  
  1652. * Displays some important execbase pointers, which give a good
  1653.   indication of whether a virus is present in your system.
  1654.   WarmCapture, CoolCapture, ColdCapture, KickTagPtr, KickMemPtr,
  1655.   and KickCheckSum are displayed. If any of these are are NOT
  1656.   zero, then either a virus, RAD, or virus protector or some
  1657.   other program that takes control of your machine when you
  1658.   reset, is present. If you suspect a virus, you may want to eject
  1659.   the disk from DF0: and type the RESET command, which should
  1660.   clear the virus. Now you should boot up on a clean disk.
  1661.  
  1662. eg.     vec
  1663. ---------------------------------------------------------------------------
  1664. ###########################################################################
  1665. ###########################################################################
  1666. ###########################################################################
  1667. ---------------------------------------------------------------------------
  1668. Changes
  1669.  
  1670. UP TO V1.3:See the source code of the ZShell V1.3 release
  1671.            (for example on FISH disk 537).
  1672.            Author: Paul Hayter
  1673.            Source: 103 KByte, Executable: 13 KByte, Doc 32 KByte.
  1674. V2.0:There were so many changes, I think there is no sense in listing
  1675.      them all here, because it may be longer than this document. So just
  1676.      read this document or the source code.
  1677.      All changes since V1.3 made by Martin Gierich. Released 14.10.94.
  1678.      Source: 180 KByte, Executable: 25 KByte, Doc 72 KByte.
  1679. V2.1:* IMPORTANT FOR THOSE WHO USED ZSHELL V2.0: Do not start ZShell V2.1 *
  1680.      * if ZShell V2.0 is resident. This will crash your machine !         *
  1681.      * Do not use ZSH V2.0 with ZShell V2.1 and vice versa.               *
  1682.   - Added a review buffer to see that again what scrolled out of the
  1683.     window. A scrollbar will probably added in future.
  1684.   - Added possibility to specify window when starting from CLI.
  1685.   - Changed default CTRL-keys; added 2 new CTRL-keys (see HISTORY).
  1686.   - Changed usage of MORE (you can still use the cursor keys).
  1687.   - DIR now hides all these files that Filenamecompletion ignores.
  1688.   - Some bugs found with mungwall and scratch are fixed.
  1689.   All changes since V1.3 made by Martin Gierich. Released 11.12.94.
  1690. V2.2: I did some bugfixes and minor improvements (I have no time for more).
  1691.   - Fixed a REALLY NASTY BUG that trashed taskswitching when closing ZShell.
  1692.   - AmigaGuide-Documentation added
  1693.   - MORE is now "more fast". 8-)
  1694.   - Filenamecompletion (display-)beeps if no match
  1695.   - CTRL-J = Shift-RETURN puts the command line in History
  1696.     buffer without executing.
  1697.   - PROMPT now knows the args %s and %c :-) . Default Prompt
  1698.     changed to "%s> ".
  1699.   - Better building of the CLI-Interface when starting from WB.
  1700.   - Now the Assign PROGDIR: is provided (KS2.0+ only).
  1701.   - LIST -Q -R also works; DIR can also list recursive.
  1702.   - ECHO Hi There ! will now do the same as ECHO "Hi There !" .
  1703.   - NEWCLI has a new argument template.
  1704.   - RUN-Command added.
  1705.   - Improved options when starting from CLI.
  1706.   - Tooltype for starting from WB without window: WINDOW=
  1707.   - Probably added some brand new nasty bugs and left some ugly old bugs ;-)
  1708.   - And what is best: The versionnumber is changed !  ;-) 
  1709.   All changes since V1.3 made by Martin Gierich. Released 3.1.95.
  1710. ---------------------------------------------------------------------------
  1711. Tips and Hints
  1712.  
  1713. * Use MORE instead of TYPE.
  1714. * Useful aliases:
  1715.         alias arexx "%1 %2 putmsg $1 0 0 0 0 0 \"$2\""
  1716.   So 'arexx showdvi "tofront"' is the same as the example in PUTMSG.
  1717.   If you want some shortcuts like MessyDOS:
  1718.         alias md makedir
  1719.         alias ren rename
  1720.         alias del delete
  1721.         alias dc diskchange
  1722.   These are only needed for Kickstart 1.3:
  1723.         alias setenv "%1 %2 echo >ENV:$1 $2"
  1724.         alias getenv "%1 type ENV:$1"
  1725.         alias unsetenv "%1 delete ENV:$1"
  1726.  
  1727. * A script counting down from 10 to 0 (a bit complicated and slow) :
  1728.     failat 11 ; setenv helpenv 11
  1729.     lab backtohere
  1730.     copy >NIL: ENV:helpenv ENV:counter
  1731.     eval >ENV:helpenv |ENV:counter 1 -
  1732.     echo "Current number: " ; eval |ENV:helpenv
  1733.     if not error
  1734.        skip backtohere
  1735.     endif
  1736.  
  1737. * From Workbench assigns are most likely done by clicking an icon:
  1738.   For example if you have the assigns below in the script
  1739.         failat 10
  1740.         assign TEX: dh0:text/pastex
  1741.         assign MF: dh0:text/pastex/metafont
  1742.         putmsg
  1743.   you need to get a PROJECT ICON for that. Now define the default
  1744.   tool as ZSH (or ZShell) and a tooltype containing
  1745.         WINDOW=
  1746.   (case sensitive). That's all. Failat 10 breaks the script if
  1747.   an error occurs. Putmsg flashes the screen to indicate that
  1748.   everything was successful. No window will be opened.
  1749. ---------------------------------------------------------------------------
  1750. Possibilities for Future Improvements
  1751.  
  1752. * Make the PATH command AmigaDOS compatible (near future !).
  1753. * Make a special Version for OS 2.0 and up which would be even smaller.
  1754. * Scrollbar for review-buffer
  1755. * Improve script file execution, like passing arguments,
  1756.   allow subroutine scripts and commands like FOR.
  1757. * More flexible environment variable handling.
  1758. * Include MOUNT/MOVE/INSTALL command.
  1759. * Rewrite COPY/DELETE.
  1760. * Faster scrolling (jump scroll/1 bitplane scroll)
  1761. * Filenamecompletion shows all files that match.
  1762. * Support more than one "*" in wildcards.
  1763. * Mini-Editor ?
  1764. * Requester to choose file/dirname.
  1765. * MORE adapts itself to the size of the window.
  1766.  
  1767. If you want to see these or other improvements made, please write to me.
  1768. ---------------------------------------------------------------------------
  1769. Copyright
  1770.  
  1771. COPYRIGHT FOR THE V1.3 PART
  1772.  
  1773. ZSHELL IS FREELY DISTRIBUTABLE. YOU CAN DISTRIBUTE THIS AS LONG AS
  1774. THIS DOC FILE REMAINS WITH THE EXECUTABLE, AND THAT NO CHARGE IS MADE FOR
  1775. THEM (APART FROM A NOMINAL COPYING CHARGE). IF YOU FEEL LIKE SENDING
  1776. ME SOMETHING FOR THIS PROGRAM, SEND ME A POSTCARD!, A P.D. DISK, A
  1777. PROGRAM YOU'VE BEEN WORKING ON ,BUT DON'T SEND ME ANY MONEY (WELL, IF
  1778. YOU REALLY, REALLY WANT TO, I GUESS I COULD PUT UP WITH IT).
  1779.  
  1780. COPYRIGHT FOR THE V2.x PART
  1781.  
  1782. This may be confusing, that there are two copyrights, but I (Martin) did
  1783. not like to change the original copyright notice. The parts belonging
  1784. to V2.x are marked in the source code with 'V2.x'.
  1785. ZSHELL IS FREELY DISTRIBUTABLE. YOU CAN DISTRIBUTE THIS AS LONG AS
  1786. THE TWO EXECUTABLES REMAIN WITH THIS DOCUMENTATION TOGETHER (AND PLEASE
  1787. DISTRIBUTE THE SOURCE FILES WITH THEM TOO), AND THAT NO CHARGE IS MADE
  1788. FOR THEM (APART FROM A NOMINAL COPYING CHARGE).
  1789. IT IS NOT ALLOWED TO USE ZSHELL COMMERCIALLY !
  1790. I would like to get your comment on ZShell to see if anybody is using it
  1791. and what can be improved.
  1792.  
  1793. Amiga, AmigaDOS, Workbench and Kickstart are registered trademarks of
  1794. Commodore-Amiga Inc.
  1795.  
  1796. DISCLAIMER
  1797.  
  1798. USE THE FILES OF THIS PACKAGE ON YOUR OWN RISK !
  1799. The authors are in no way responsible for what you are doing with it
  1800. or what it does to you or your soft- and hardware.
  1801. ---------------------------------------------------------------------------
  1802. Credits
  1803.  
  1804. CREDITS FROM PAUL
  1805.  
  1806. Many thanks to Wayne for his invaluable help in doing the history
  1807. and command line editing parts of ZShell. Also, thanks to
  1808. Tim Strachan who asked for the history stuff.
  1809. ZShell was entirely written using Wayned by Wayne Hayter (various
  1810. versions). And was assembled with A68K V2.61 by Charlie Gibbs. And
  1811. linked with Blink V6.7 by the Software Distillery.
  1812.  
  1813. CREDITS FROM MARTIN
  1814.  
  1815. Many thanks to the six people who wrote me: Laura, Igor, Willem, Nico, Max
  1816. and Alexandros; especially to Laura for lots of mail :).
  1817. Thanks to Frank for using ZShell.
  1818. I hope that in future some more people write to me.
  1819. ---------------------------------------------------------------------------
  1820. Authors
  1821.  
  1822. * Please send any correspondence and/or bug reports referring V1.3
  1823.   to me at the address below:-
  1824.  
  1825.       Paul Hayter
  1826.       PO Box 331
  1827.       Ballina
  1828.       2478
  1829.       AUSTRALIA
  1830.  
  1831. * Please send correspondence, bug reports, comments, suggestions
  1832.   for future improvements etc. referring V2.x to this adress:
  1833.  
  1834.       Martin Gierich
  1835.       Narzissenweg 7
  1836.       76297 Stutensee
  1837.       GERMANY
  1838.  
  1839.   If you have EMAIL access, please send me one at this adress:
  1840.  
  1841.           uj3w@ibm3090.rz.uni-karlsruhe.de  (Internet)
  1842.   or to   uj3w@rz.uni-karlsruhe.de          (but better to the above one)
  1843.   or to   UJ3W@DKAUNI2                      (Bitnet)
  1844.  
  1845.   I will try to reply EVERY EMail I get !
  1846.  
  1847. ---------------------------------------------------------------------------
  1848.  
  1849.