home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / shell / zshell / old / zshell13.doc < prev    next >
Text File  |  1994-10-12  |  32KB  |  1,009 lines

  1.  
  2.         ZSHELL V1.30 (C) 1990,91 PAUL HAYTER
  3.                  ======================================
  4.  
  5.     OVERVIEW
  6.     ========
  7.  
  8.     ZShell is a small CLI shell. I needed a shell which had my
  9.     favourite features of CSH yet was a lot smaller, so it would load
  10.     faster and use much less memory.
  11.  
  12.  
  13.     FEATURES
  14.     ========
  15.  
  16.     *  about 13K.
  17.     *  Supports the standard housekeeping commands
  18.         dir , cd , rename , mkdir , delete , copy , path , info ,
  19.         type.
  20.     *  Function key aliasing.
  21.     *  Command aliasing.
  22.     *  Reverse Polish Calculator.
  23.     *  Script file execution.
  24.     *  1024 byte command line history.
  25.     *  Command line editing.
  26.     *  Can examine the KickTagPtr,CoolCapture etc.
  27.     *  Has a cold reset command.
  28.     *  Wild Card file descriptions.
  29.     *  Special programmers status mode.
  30.     *  Simple 'More' type text viewer.
  31.     *  Has a resident command.
  32.     *  IF ... ELSE ... ENDIF constructs.
  33.  
  34.     SPECIAL CHARACTERS
  35.     ==================
  36.  
  37.     The following characters have special meanings to ZShell.
  38.  
  39.      "  "    Double quotes. Used to enclose strings with spaces.
  40.         eg "hello world".
  41.      ^n    Hat character. Prefixes a control character letter (n).
  42.         Used in ASK, ECHO, & SET commands. eg ^L   <-clear screen
  43.      %n    Percent prefixes a number (0-7) to specify an optional
  44.         parameter for command aliases. Used in SET command.
  45.         Can also be used to specify prompt arguments. See PROMPT
  46.         command.
  47.      $n    Dollar prefixes a number (0-7) and corresponds to an
  48.         optional parameter specified with %n (above).
  49.      *?~[]    Wildcard characters. * matches 0 to n characters. ? matches
  50.         one character, ~ negates the following wild card, and [ ] 
  51.         surround a class of characters to match. See WILD CARDS.
  52.      \n    Backslash prefixes a special character, whose meaning you
  53.         want ignored. eg echo "hello \"fred\""  (hello "fred")
  54.      ;    Semi-colon seperates multiple commands on one line.
  55.         eg. cd df1:;dir
  56.      >    redirect output.
  57.      <    redirect input.
  58.      >>    redirect append output.
  59.  
  60.  
  61.     ZSHELL INBUILT COMMANDS
  62.     =======================
  63.     
  64.     Most commands can be aborted by depressing Control-C.
  65.  
  66.     A textual error message will be displayed if an AmigaDOS error
  67.     occurs.
  68.     ------------------------------------------------------------------------
  69.     ADDBUFFERS drive number_of_buffers
  70.  
  71.     * ADDBUFFERS increases disk access speed on the specified drive by
  72.       adding a number of sector cache buffers. Each additional buffer
  73.       reduces memory by about 500 bytes. Generally, 25-30 buffers is
  74.       optimal.
  75.  
  76.     eg.    addbuffers df0: 25
  77.         addbuffers df1: 10
  78.     ------------------------------------------------------------------------
  79.     ASK [question]
  80.  
  81.     * ASK prompts the user with a question requiring a Yes or No
  82.       answer. If the first letter of the users response is 'Y', ASK
  83.       returns code WARN. Any other letter will result in return code OK.
  84.       The question can include ASCII characters as well as control
  85.       codes as per the ECHO command.
  86.  
  87.     eg.    ask "Do you want commands copied to ram? "
  88.         if warn
  89.             copy c: ram:
  90.         endif
  91.     ------------------------------------------------------------------------
  92.     ASSIGN [logical name:] [directory]
  93.  
  94.     * ASSIGN will assign a logical device name to a disk directory.
  95.  
  96.     eg.    assign z: df1:zshell_source
  97.  
  98.     Now if you do a DIR Z: you will get a directory of df1:zshell_source.
  99.     Similarly, the default device names can be reassigned.
  100.  
  101.     eg.    assign libs: df1:libs
  102.  
  103.     * Typing ASSIGN with no parameters, will list the current device
  104.       assignments.
  105.     eg.    assign
  106.  
  107.     * NOTE: the logical name you give to the command MUST end in a
  108.             colon (:)
  109.         Assign is compatible with the amigados assign command.
  110.     ------------------------------------------------------------------------
  111.     CD [destination]
  112.  
  113.     * Changes the current directory to 'destination'. If no parameter
  114.       is given, the current directory's name is shown.
  115.  
  116.     eg.   cd ram:
  117.     ------------------------------------------------------------------------
  118.     COPY [-r] source1 [sourcefile2] [sourcefile3]... destination
  119.  
  120.     * There are 6 derivatives of the copy command.
  121.  
  122.      1. copy file to file.
  123.  
  124.         eg.    COPY C:LIST RAM:LS
  125.  
  126.      2. copy file to a directory.
  127.  
  128.         eg.    COPY C:MOUNT DF1:C
  129.  
  130.      3. copy multiple files to a directory.
  131.  
  132.         eg.    COPY L:PORT-HANDLER L:DISK-VALIDATOR DF1:L
  133.  
  134.      5. copy files in a directory to another directory.
  135.  
  136.         eg.    COPY C: DF2:C
  137.  
  138.      4. copy multiple directories to a single directory.
  139.  
  140.         eg.    COPY L: DEVS: C: RAM:
  141.  
  142.      6. Recursively copy all files and subdirectories within the source
  143.         directory to the destination directory.
  144.  
  145.         eg.    COPY -R DF0: DF1:
  146.  
  147.     Other examples:
  148.  
  149.     eg.    copy fred wilma
  150.     eg.    copy c:dir df1:c
  151.     eg.    copy dir list type cd df1:c
  152.     eg.    copy df0:devs df1:devs
  153.     eg.    copy *.s ram:
  154.         copy df0: df1:        {only copy the files in df0: to df1:}
  155.     ------------------------------------------------------------------------
  156.     DELETE [-r] source1 [source2] [source3] [source4]... [source11]
  157.  
  158.     * Deletes up to 11 files or directorys ('source1'...'source11').
  159.     * If you specify the -r option when deleting a directory, then all
  160.       subdirectories are recursively deleted also. Otherwise (if the -r
  161.       option is not given) only the files in the specified directory are
  162.       deleted.
  163.  
  164.     eg.    delete fred wilma barney betty dino
  165.         delete df0:devs df1:c df1:data ram:
  166.         delete menu
  167.         delete -r devs:
  168.         delete -r df1:
  169.     ------------------------------------------------------------------------
  170.     DIR [source]
  171.  
  172.     * Lists the directory of the 'source' to the screen. Hitting space
  173.       will pause the listing and backspace will continue it. Files are
  174.       shown with their size in bytes. DIR lists the current directory
  175.       if no parameter is given. If 'source' is a filename, then only
  176.       that file is listed.
  177.  
  178.     eg.   dir df0:
  179.     ------------------------------------------------------------------------
  180.     DIW [source]
  181.  
  182.     * This is identical to the above DIR command ,except that the
  183.       directory is printed in two vertical columns. DIW is a pseudonym
  184.       for Directory Wide.
  185.  
  186.     eg.   diw devs:
  187.     ------------------------------------------------------------------------
  188.     ECHO [string]
  189.  
  190.     * Prints the 'string' to the screen. If you want spaces in the
  191.       string, make sure the whole string is enclosed in quotes. If you
  192.       want to print special control characters (eg. ctrl-L clear screen)
  193.       then prefix the control letter with a ^ character. If you want to
  194.       print double quotes, then use the \ character before the qoutes.
  195.  
  196.     eg.    echo hello
  197.         echo "hello world"
  198.         echo "^Lthe screen was just cleared"
  199.         echo "^Lline 1^Jline 2^Jline 3"
  200.         echo "these are double quotes ->\""
  201.  
  202.     * Some common control codes are:
  203.  
  204.         ^J    linefeed.
  205.         ^L    clear screen.
  206.         ^M    carriage return.
  207.         ^X    clear line.
  208.         ^[    escape.
  209.  
  210.     ------------------------------------------------------------------------
  211.     ELSE
  212.  
  213.     * ELSE marks the middle of an IF statement. All statements
  214.       following it, and before the ENDIF statement will be executed
  215.       only if the IF condition is FALSE. See IF for usage.
  216.  
  217.     ------------------------------------------------------------------------
  218.     ENDIF
  219.  
  220.     * ENDIF marks the end of an IF statement. See IF for usage.
  221.  
  222.     ------------------------------------------------------------------------
  223.     EXEC source
  224.  
  225.     * Executes the ZShell script file of name 'source'. All ZShell
  226.       commands, as well as commands from disk are valid within a
  227.       script file.
  228.  
  229.     eg.   exec install_hard_disk
  230.     ------------------------------------------------------------------------
  231.     EXIT
  232.  
  233.     * Exits you from the shell back to the AmigaDOS CLI prompt.
  234.  
  235.     eg.   exit
  236.     ------------------------------------------------------------------------
  237.     FAILAT [failat level]
  238.  
  239.     * FAILAT sets the error code level at which scripts (and multiple
  240.       commands on one line) will be aborted. The default level is 10.
  241.       Most commands return 10 as a serious error, while compilers
  242.       returning Warning type errors will return 5. Hence, the default
  243.       of 10 will allow Warnings to occur without the script (or line)
  244.       being aborted.
  245.  
  246.     eg.    failat 20    {sets failat level to 20}
  247.  
  248.     * If you do not specify a failat level, the current setting is
  249.       shown.
  250.  
  251.     eg.    failat
  252.     ------------------------------------------------------------------------
  253.     GOTO label
  254.  
  255.     * GOTO searches for the label within the curren