home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / shell / zshell / zshell.guide (.txt) < prev    next >
Amigaguide Document  |  1995-01-02  |  78KB  |  1,631 lines

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