home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
files
/
util
/
cli
/
qcd
/
qcd.doc
< prev
next >
Wrap
Text File
|
1995-06-11
|
8KB
|
203 lines
_ _ _
__ _ ___ __| | / | / |
/ _` |/ __/ _` | | | | |
| (_| | (_| (_| | | |_| |
\__, |\___\__,_| |_(_)_|
|_|
© 1993-1995 by Frank Würkner
All Rights Reserved
COPYRIGHT NOTE
¯¯¯¯¯¯¯¯¯¯¯¯¯¯
The program qcd is copyrighted © 1995 by Frank Würkner.
All rights reserved.
qcd is FREEWARE. This program may be freely distributed as long as
- the executable and documentation remain unchanged and
are included in the distribution
- No other charge is made than to cover time and copying costs
DISCLAIMER
¯¯¯¯¯¯¯¯¯¯
No warranties of any kind are made as to the functionality of this
program. You are using it ENTIRELY at your own risk.
SYSTEM REQUIREMENTS
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
To run qcd you'll need OS2.0 or higher !!!
QUICK OVERVIEW
¯¯¯¯¯¯¯¯¯¯¯¯¯¯
With qcd you can not only match paths, but also assigns/volumes/devices,
e.g. loc*:cat* would be short for locale:catalogs. If more than one
path maches it will ask you which one you really meant. Whenever possible
it understands the Unix elements . .. ~ / ,though the Amiga syntax has
priority. You also have the ablility to set a CDPATH variable to show
the program where to look for your directories. Of course you can go
back to the directory where you where before (similar to the script S:PCD).
Finally you can also select the directory via filerequester.
USAGE
¯¯¯¯¯
qcd only works in your CLI, so don't start it from your Workbench !
Nearby qcd is pure and can be made resident (and it is adviced to do so).
It has the following template :
DIR,NOREQ/S,NOPAT/S,NOHARD/S,NOSOFT/S,NOUX/S,FREQ/S,
PCD=-/S,PPCD=--/S,WAIT/K/N
DIR
Normal Amiga syntax:
<assigns/volumes/devices>: absolute Path
: the root of your current directory
/ the parent directory
Unix syntax:
/ (first char) Root (see also ENVIRONMENT VARIABLES)
~ Home (see also ENVIRONMENT VARIABLES)
. current directory
.. the parent directory
As described in the QUICK OVERVIEW you can use patterns where ever
you like. Here some examples and the explanation in brackets:
> qcd ram:env/sys [just normal cd, anything accepted by cd
is also accepted by qcd]
Ram Disk:Env/Sys> qcd / [this would make RAM:Env in Amiga syntax
and RAM: in Unix syntax, but qcd always
assumes that you meant the Amiga syntax,
if only one directory matches with
Amiga syntax]
Ram Disk:Env> qcd :* [so what to do? RAM:Clipboards RAM:T
and RAM:Env matches: let the user decide]
1.) Ram Disk:Env
2.) Ram Disk:Clipboards [if you would see 10 directories plus "..." it
3.) Ram Disk:T would mean there are more than 10 matching]
Which directory ??? 2
Ram Disk:Clipboards> qcd ../t [obviously Unix syntax, because no
".." directory exists here]
Ram Disk:T> qcd :*// [qcd will check that all ways end in RAM:]
Ram Disk:> qcd xyz: [Assuming xyz: is not mounted, you will not
see a "Please insert ..." requester,
because qcd scanns the devicelists and
knows it does not exist.]
Can't find directory "xyz:".
Ram Disk:>
NOREQ/S
When cding to a device with changeable media, such as DF0: and
no media is inserted, you get a "Please insert ..." requester.
To suppress the requester set this switch.
NOPAT/S
Set this if you want to change to a directory with #,?,|,~,%,[,-,],'
in it, e.g. "qcd ?x#'* NOPAT" insted of "qcd '?x'#'''*"
NOHARD/S
The default is to handle hardlinks to directory in the same way as
normal directories. Set this switch if you don't want to walk over
hardlinks when using pattern matching. You can still cd to hardlinked
directories when using the full name.
NOSOFT/S
The same is true for softlinks.
NOUX/S
Set this if you don't want to use the Unix pathelements. That means
/ ~ . .. are no longer understood.
FREQ/S
Display a filerequester and cd to the selected directory.
PCD=-/S
Cd to your last directory. (Of course this only works if you used
qcd to change the directory)
PPCD=--/S
Cd to your directory before your last directory. (Of course this only
works if you used qcd to change the directories)
WAIT/K/N
If you cd to a device with changeable media, such as DF0: and you
previously changed the media, you might get a "Please insert ..."
requester. This is because the system didn't check yet that there
is a media present now. You can tell qcd to wait some amount of
time to let the system notice the change. The amount of time is given
in ½ seconds, e.g. "qcd df0: wait=4" to wait a maximum of 2 seconds.
ENVIRONMENT VARIABLES
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
The value in the brackets is used if the variable is unset.
"CDPATH" [default ",SYS:"]
Probably the most important one. Tells the program where to look
for your relative directories. The "," sperates each of your directories,
if your directory contains a "," you must write "\," and if your
directory contains a "\" you must write "\\" (though your directories
shouldn't contain such crazy chars). To make qcd act as the normal cd
only specify "\" as CDPATH (this is because "" will unset the variable).
"ROOT" [default ":"]
Unlike the Unix filesystem there is no root of all devices in
the Amiga filesystem, so you might like "SYS:" or something else
as your "root".
"HOME" [default "SYS:"]
In most Unixshells "~" gets expanded to your homedirectory.
Set this variable to any path you need to cd often.
Following local variables are set by qcd:
"PWD"
Your last directory (Previous Working Directory)
"PPWD"
The directory before your last (Pre-Previous Working Directory)
TIPS
¯¯¯¯
If you want to use qcd in your shell you should keep in mind that qcd
is NOT designed to replace the cd command, this is because of the fact
that shell scripts could have problems with following points
- qcd is designed to be interacive if there is a need
- qcd accepts paths which would be refused by cd, e.g. SYS:s/RAM:
- qcd doesn't pop up a requester if a volume is not currently known
to the system. But scripts use e.g. "cd Install1:" to inform the
user to insert an other disk
So don't use the commands (nearby I get a "Memory header not located"
guru when using these commands, but this
must be a bug in the resident command)
> resident cd remove
> resident cd c:qcd
I would advice you to add the lines
> resident c:qcd
> alias cd qcd [] noreq wait=6
or something similar to your S:Shell-Startup file. You can also set the
environment variables here.
HISTORY
¯¯¯¯¯¯¯
1.0
first release
1.1
o removed a bug that caused KCON: to crash when having the current
directory name in the title of the shell
If you have comments, suggestions, criticism, bug reports etc.
send mail to
Frank Würkner
Georgenschwaigstr. 22
D-80807 München
Germany
or
E-Mail: wuerkner@informatik.tu-muenchen.de