@NODE UtilStart "Starting from Hotkey-Utilities or Directory-Utilities"
In most cases you have to use a template like @{" starting from CLI " Link CLIStart}
when configuring the utility.
If the utility does not open a window, you have to use the "-w" option.
If the utility seems to hang up after starting ZShell, try the "-d" option.
Example: zshell -wCON:1/10/640/100/ZShell -d
Some special programs:
YAK: Use "zshell -d" as argument of a hotkey-definition.
MachV: EXECMD"zshell -wcon: -d"
MTool: Define a program with "zshell" as program and "-d" as parameters.
@ENDNODE
@NODE StartingCON "Starting ZShell using KingCON"
KingCON is a Console-Handler with some GUI-Features.
If you do not use KingCON, you can skip this chapter.
Starting from CLI/Shell:
Use the option -n, and you can optionally use option -w.
Examples: ZShell -n
ZShell -wKCON: -n
Starting from Workbench:
Use the ToolTypes NORAW and WINDOW=KCON:
The CLI-Option "-n" and the ToolType "NORAW" switch off the internal
command-line-editor, so you could make use of the command-line-
editing facilities of KingCON.
@ENDNODE
@NODE Conuse "How to use CON:"
CON: stands for Console-Handler. This is a program which handles
keypresses and textual outputs on its window similar to a file.
You have to pass several things when opening a CON: window:
CON:leftpos/upperpos/width/height/title
leftpos,upperpos are the position of the left top edge in pixels.
Both need to be 1 or more.
width,height are the window's dimensions in pixels.
title is a string
With OS2.0+ you can pass some more things and you can drop some things.
So "CON:" alone is valid and opens with the default settings.
To get a close gadget you have to append "/CLOSE", eg.
CON:1/1/600/100/Great/CLOSE
"/SCREEN screenname" opens on a public screen
"/WAIT" stays till you click the close gadget or press CTRL-\
"/ALT" gives an alternative size with the zoom gadget
... there are some more but I do not know much of them
@ENDNODE
@NODE ErrorStart "Errors during starting"
If there is an error during starting, a recoverable alert will appear
and show a number. Here is a list what these numbers mean:
Workbench-Start:
1: No mem for CLI-Struct
2: CLI-Table 20 limit
3: No current Dir
4: No icon.library
5: No icon
OpenWindow:
10: Already opened
11: Cannot open output
12: Not interactive
13: Cannot open input
Newcli:
15: Cannot copy CurrentDir
Input:
20: Input failed
@ENDNODE
@NODE Notes "Several notes"
* You can start ZShell from within the Startup-Sequence. After ending
ZShell the Startup-Sequence will continue. If you use "ZShell -d" in
the Startup-Sequence, it will continue and a ZShell will pop up.
* If you would like a scrollbar, try CB (ConBuffer) from
Aminet/util/shell/conbuffer11.lha . A bit old, but it works.
* You can rename "ZSH" as what you like, but do not rename "ZShell"
* If you start ZShell from the Workbench-Menu "Execute Command",
you can close the window after ending ZShell with CTRL-\ or
doubleclick the close-gadget.
* 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 OS2.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 in OS2.0+)
SHIFT DOWN ARROW- go to the last line in the history buffer, which
holds the last modified line
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 R - move cursor to start of previous word
CTRL T - move cursor to start of next word
CTRL S - delete to start of line
CTRL E - delete to end of line
CTRL W - delete one word right of cursor
CTRL Q - delete one word left of cursor
CTRL X - delete whole line
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}
CTRL F - pop up a filerequester (needs asl.library)
CTRL L - clear the ZShell window
RETURN - put commandline in history-buffer and execute it
SHIFT RETURN - put commandline in history-buffer without executing
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.
If you have defined (using @{" ALIAS " Link Alias}) some Function keys,
you can use them, too.
OS2.0+:
You can drop Workbench-Icons into the ZShell's window. Then the name of
the icon will be inserted into the commandline.
When in @{" iconifyed " Link Flags 20} mode, you can drop an icon on that
Application-Icon with the same effect.
@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 @{" COMMAND OVERVIEW " Link Index})
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 was found on disk, it will be analyzed:
1. If the commandname is a directory, the current directory will be
changed (see @{" CD " Link CD}) to it.
2. If the script flag is set, it will be @{" executed " Link Execute} eighter
as ZShell script or as ARexx script.
3. If the execute flag is set (and it is set in most cases), it will
be treated as normal executable command.
4. If the execute flag is set, but the command is not executable, it
will be shown using @{" amigaguide.library " Link Guide.lib}.
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").
To get to the parent directory, you have to use a slash ( / ).
eg. .addbuffers df0: 20
{This uses the disk command or if available the resident addbuffers}
ad. df0: 20 {uses the internal addbuffers command}
.add. 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!
di. can mean DIE or DIR, but DIE will be taken !
There is no abbreviation for disk commands, use @{" FileNameCompletion " Link FileNameCompletion}
( TAB-Key ) instead.
A textual error message will be displayed if an AmigaDOS error occurs.
@ENDNODE
@NODE Guide.lib "amigaguide.library"
For those who do not know:
amigaguide.library is Commodore's great hypertext system that can
easily be used to view documentations or to implement online-help into
own applications.
It needs Kickstart 1.3 or better.
You can get it from Fish Disk 920 or from Aminet as text/hyper/aguide34.lha
amigaguide.library V34+ can show AmigaGuide documents and ASCII documents.
V39+ that comes with OS3.0+, can show all kinds of files that are supported
by your datatypes including AmigaGuide and ASCII texts.
So, with OS3.0+, you can enter the name of a picture in ZShell just like
a command to view it.
@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},@{" CTRL " Link CTRL},@{" JOIN " Link JOIN},@{" MOVE " Link MOVE},@{" PROTECT " Link PROTECT})
Wild cards are like those supported on MessyDOS or UNICS 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.
If you would like to use AmigaDOS wildcard-patternmatching use
@{" FLAGS WILD ON " link Flags 30} (this uses MatchPatternNoCase(), so OS2.0+ only).
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 -C " Link CTRL 27}.
If you do not want to see all files that match,you can use
@{" FLAGS MATCH OFF " Link Flags}.
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"
As nearly everything, options are also case independent.
The internal commands support only four 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},@{" JOIN " Link JOIN},
@{" MOVE " Link MOVE},@{" PROTECT " Link PROTECT}
3. -Q or -QUICK , used by @{" DIR " Link DIR},@{" JOIN " Link JOIN},@{" LIST " Link LIST},@{" DELETE " Link DELETE}
4. -S or -SORT , used by @{" COPY " Link COPY},@{" MOVE " Link MOVE},@{" PROTECT " Link PROTECT}
So instead of typing "dir -q" you can also type "dir -quick".
Instead of -R you could also use ALL , if @{" FLAGS ALL ON " Link Flags 49} is set.
For some special cases there are longer options used: "delete bla force"
FORCE is here an option. You can abbreviate this by a point (see @{" CTRL " link CTRL}),
so "delete bla f." is the same.
@ENDNODE
@NODE Redirect "Redirecting 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.
>M view output with @{" MORE " link MORE} after the command has ended,
you need a @{" review-buffer " link REVIEW} for that which is big enough,
otherwise some of the output will be swallowed.
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
list >m df0: {view output with more}
copy > df0: ram: {redirects to NIL: !}
@ENDNODE
@NODE Index "Command Overview"
@{" AddBuffers " Link AddBuffers} drive [number_of_buffers]
@{" Alias " Link Alias} [variable] [definition]
@{" Ask " Link Ask} [question]
@{" Assign " Link Assign} [logical name:] [directory] [ADD|DEFER|PATH|REMOVE]
@{" Avail " Link Avail} [-C]
@{" Border " Link Border} ON|OFF [number]
@{" Break " Link Break} task_description [signalmask|C|D|E|F]