* To avoid using an internal command or an alias, you can put a point
before it, eg. ".assign libs: df0:libs add".
* To complete a filename, type in a bit then press TAB.
* If you use "ctrl -c *.info", DIR and Filenamecompletion ignores Icons.
* To start buffering output, use "review 20000". Press Shift+TAB to see it.
* If you have OS3.0+, try "ctrl -r 01111111".
* If you start ZShell from the Workbench-Menu "Execute Command", you
can close the window after ending ZShell with CTRL-\ .
* You get a standard prompt with: prompt "%n.%p> "
* Try to execute "ZShell ?".
* See @{" Tips and Hints " link Tips} for more.
@ENDNODE
@NODE Distribution "Distribution"
Following files belong to this document:
1) ZShell The main executable
2) ZSH The small starter
3) ZShell.doc The documentation (and online help manual)
4) ZShell.guide The AmigaGuide documentation
5) ReadMe Short description
6) ZStart An example startup script (can be put in S: )
7) ZShell.s Source code of the main executable
8) ZSH.s Source code of the small starter
and some icons.
@ENDNODE
@NODE General_Usage "General Usage"
@{" Starting ZShell " Link Starting}
@{" History and Command Line Editing " Link History}
@{" Executing Commands " Link Executing}
@{" Wild Cards " Link Wild_Card}
@{" Filenamecompletion " Link Filenamecompletion}
@{" Options " Link Option}
@{" Redirect Input/Output " Link Redirect}
@{" Special Characters " Link Special_Characters}
@ENDNODE
@NODE Starting "Starting ZShell"
* There are three ways of starting ZShell:
1. The easiest way:
Start the file called "ZShell" from Workbench or CLI/Shell.
2. Put the file called "ZShell" in the C: directory and
start the file called "ZSH" from Workbench or CLI/Shell.
3. A bit complicated and only for starting from Workbench:
Make a startup script (see below) or an empty file with a PROJECT
icon. Change the default tool to "ZSH" or "ZShell" (better ZSH,
but put ZShell in C: ) with the right path. Doubleclicking on
this project icon will start ZShell and execute its script.
You can also shift-doubleclick a startup script with ZSH/ZShell.
(You can rename "ZSH" as what you like, but do not rename "ZShell").
The first way is recommended for having a quick glance at ZShell,
but if you use ZShell sometimes, the second way is better.
Why ? Because "ZSH" is about 800 Bytes long and starts the ZShell-
resident if possible. So loading "ZShell" is only necessary the first
time you use ZShell after booting up.
* If starting from CLI/Shell you can specify the name of a script file
(see @{" EXECUTE " Link EXECUTE}) as an argument which will be executed after starting.
Precede the name with "-s". If there is no name given, ZShell will try
to execute S:ZStart . After "-w" you can specify a window-description.
See @{" NEWCLI " link NewCLI} for more details, it is exactly the same.
eg. ZSH -sram:hello {will try to execute ram:hello}
ZShell {will try to execute S:ZStart}
ZSH -sram:hello "-wCON:10/10/90/90/Hi there" {opens this window}
* If starting from Workbench you can specify the window-description
and the startup script (default S:ZStart , see above) with ToolTypes:
eg. WINDOW=con:20/50/400/100/Moin
SCRIPT=ram:hello
WINDOW= {this would not open a window}
Make sure that WINDOW and SCRIPT are in capital letters.
(You can edit the ToolTypes by selecting an icon and then choosing
"Information" from the Workbench-Menu.)
* NOTE1: If you start ZShell from the Workbench-Menu "Execute Command",
you can close the window after ending ZShell with CTRL-\ .
* NOTE2: ZShell and ZSH are PURE (see @{" RESIDENT " Link RESIDENT},@{" PROTECT " Link PROTECT}).
@ENDNODE
@NODE History "History and Command Line Editing"
ZShell has a 1024 byte circular history buffer. It works similar
to most other shells, the NEWCON: handler in Workbench V1.3 and
the standard console handler in Kickstart 2.0+.
You can change the edit keys with @{" CTRL " Link CTRL}. These are the default keys:
UP ARROW - go back one line in the history buffer
DOWN ARROW - go forward one line in the history buffer
SHIFT UP ARROW - go to the 1st line in the history buffer if nothing
was typed. Otherwise the string left of the cursor
will be searched in history buffer (like KS2.0+)
SHIFT DOWN ARROW- go to the last line in the history buffer, which
should be blank
LEFT ARROW - move cursor left
RIGHT ARROW - move cursor right
SHIFT LEFT ARROW- move cursor to left end
SHIFT RIGHT ARROW move cursor to right end
CTRL S - move cursor to start of line
CTRL E - move cursor to end of line
CTRL R - move cursor to start of previous word
CTRL T - move cursor to start of next word
CTRL W - delete one word right of cursor
CTRL Q - delete one word left of cursor
CTRL X - delete whole line
CTRL L - clear the ZShell window
RETURN - put commandline in history-buffer and execute it
SHIFT RETURN - put commandline in history-buffer without executing
TAB - see @{" FILENAMECOMPLETION " Link FILENAMECOMPLETION} (that is great !)
SHIFT TAB - read @{" review-buffer " Link review} with @{" MORE " Link MORE}
CTRL V - read history-buffer with @{" MORE " Link MORE}
ESC (Escape) - quit ZShell like @{" ENDCLI " Link ENDCLI} (I like this very much !)
Words are delimited by space, point, slash and colon ( ./:).
Again, command line editing is similar to most shells. Backspace,
delete and return do what they are supposed to do.
@ENDNODE
@NODE Executing "Executing Commands"
Most commands can be aborted by depressing Control-C.
Nearly everything is case independent.
To use a disk command simply type its name after the prompt, the
same way as you would do in other shells. The first part of the input
up to the first space is interpreted as commandname. It is searched
for (in this order) :
1. in the @{" alias " Link alias} list
2. in the internal (builtin) command list (see BUILTIN COMMANDS)
3. in the @{" resident " Link resident} command list
4. in the current directory (see @{" CD " Link CD})
5. in the command search @{" path " Link path}
and, if it is found, it is executed. The part after the first space
is taken as arguments, also called parameters. The arguments are
separated by spaces. ZShell will allow up to 25 arguments.
If the commandname is a directory, the current directory will be
changed (see @{" CD " Link CD}).
eg. addbuffers df0: 15
"addbuffers" is the command, that will be found as a internal command.
"df0:" is the first argument. "15" is the second argument. The third
argument does not exist.
You can avoid using an @{" alias " Link alias} or an internal (builtin) command or
changing the current directory by typing a point before the
commandname (this is called "force disk").
To abbreviate internal or @{" resident " Link resident} commands put a point behind it.
If you use just a point, the current directory will be set to the
last current directory ("dir back").
eg. .addbuffers df0: 20
{This uses the disk command or if available the resident addbuffers}
ad. df0: 20 {uses the internal addbuffers command}
.ad. df0: 20 {if available this uses the resident addbuffers}
. {go back to old current dir}
BEWARE of other matching commands! The first matching will be taken!
res. can mean reset or resident, but reset will be taken !
There is no abbreviation for disk commands, take @{" FileNameCompletion " Link FileNameCompletion}
( TAB-Key ) instead.
A textual error message will be displayed if an AmigaDOS error occurs.
@ENDNODE
@NODE Wild_Card "Wild Cards"
ZShell supports wild card file descriptions on some commands
(@{" DIR " Link DIR},@{" LIST " Link LIST},@{" DELETE " Link DELETE},@{" COPY " Link COPY},@{" RECOPY " Link RECOPY},@{" CTRL " Link CTRL}). Wild cards are like those
supported on MS-DOS (tm) or UNIX (tm) systems, and not the same as
the ones on AmigaDOS. So use * instead of #? .
NOTE: You can only effectively put one * character in a wild card.
Character Meaning
* Match zero or more characters.
? Match one character.
~ Negates the following wildcard.
[ ] Specifies a class of characters to match.
(One of the characters in the brackets must match)
| Separate multiple filenames (can be wildcards)
(One of the file descriptions separated by | must match)
To get that just try the examples following and try it out with @{" DIR " Link DIR}.
eg. list *.info {lists all files ending in .info}
dir z*.s {lists all files starting z, ending in .s}
delete df0:*.info {deletes all .info files from df0:}
copy *.s ram: {copies all .s files to ram:}
copy 1? df0: {copies all two char files beginning with 1}
dir ~*.s {lists all files NOT ending in .s}
list ~*.info {lists all files except for .info files}
dir *.[co] {lists files ending in .c or .o}
list [abcd]* {lists files beginning with a,b,c or d}
list c:mount|version {lists the files Mount and Version}
list ram:env/a*|*b {lists all files starting with a or
ending with b from RAM:env (environment)}
copy ~*.info|*.bak {copies all files NOT ending in .info
and NOT ending in .bak}
@ENDNODE
@NODE Filenamecompletion "Filenamecompletion"
Filenamecompletion makes typing long filenames and directorynames
easier. It does not matter if you want to type it as command or as
argument. Just type some beginning characters of the desired name and
then press TAB . If there is more than one possibility that
match, it will only be completed as far as all possibilities match.
In this case type the next character then again press TAB . If a
filename was fully matched, a space after it will be inserted. If
a directoryname was fully matched, a slash (/) will be inserted after.
If no partial match is found, the screen blinks (display beep).
Maybe you do not want *.info files to be completed. This will avoid
some trouble. Use "ctrl -c *.info" for that or see @{" CTRL " Link CTRL}.
For example a directory contains:
MegaEditExample
MegaEditExample.info
MegaViewer
MoreMegaFiles {directory}
If you want to change the current directory to MoreMegaFiles you type:
mo
then press the TAB key. You will see the full name with a slash at the
end. Just press RETURN and you changed it.
To delete MegaViewer you type:
delete me
and press TAB . You will see "Mega". Now type the V key and
press TAB again. You see "delete MegaViewer ". Press RETURN and
it will be gone.
You want to start MegaEditExample. Type:
me
and press TAB. Then type E and press TAB. There is no space after the
name. This is because MegaEditExample.info also matches.
Start it by pressing RETURN.
@ENDNODE
@NODE Option "Options"
The internal commands support only three options, because this is
easier to remember. These options start with a dash (-) .
1. -C or -CLEAR , used by @{" AVAIL " Link AVAIL},@{" ENDCLI " Link ENDCLI},@{" LOCATE " Link LOCATE},@{" PATH " Link PATH},
@{" RESIDENT " Link RESIDENT},@{" RUN " Link RUN},@{" CTRL " Link CTRL}
2. -R or -RECURSIVE , used by @{" COPY " Link COPY},@{" DELETE " Link DELETE},@{" DIR " Link DIR},@{" LIST " Link LIST},@{" RECOPY " Link RECOPY}
3. -Q or -QUICK , used by @{" DIR " Link DIR},@{" LIST " Link LIST}
So instead of typing "dir -q" you can also type "dir -quick".
As nearly everything, options are also case independent.
@ENDNODE
@NODE Redirect "Redirect Input/Output"
The standard redirection operators are supported for all internal
commands, as well as disk based programs. (Redirection only affects
those programs which use the dos.library's Input() and Output()
functions.)
> redirect std output.
< redirect std input.
>> append redirect output. (tacks output onto the end of file)
<> redirect input and output (not yet implemented).
eg. dir >ram:directory df0:c
type zshell.doc <raw:0/0/100/100/input >raw:0/0/640/100/output
sortfile things >>df0:things.log
@ENDNODE
@NODE Special_Characters "Special Characters"
The following characters have special meanings to ZShell.
" " Double quotes. Used to enclose strings with spaces.
eg "hello world".
^n Hat character. Prefixes a control character letter (n).
Used in @{" ASK " Link ASK},@{" ECHO " Link ECHO}&@{" ALIAS " Link ALIAS} commands. eg ^L <-clear screen
%n Percent prefixes a number (0-7) to specify an optional
parameter for command aliases. Used in @{" ALIAS " Link ALIAS} command.
Can also be used to specify prompt arguments. See @{" PROMPT " Link PROMPT}.
$n Dollar prefixes a number (0-7) and corresponds to an
optional parameter specified with %n (above).
*?~[]| @{" Wild card " Link Wild_card} characters. * matches 0 to n characters. ? matches
one character, ~ negates the following wild card, and [ ]
surround a class of characters to match.
\n Backslash prefixes a special character, whose meaning you