At home on my PC I have NCD installed. At work I work
with Unix (HP-UX Korn Shell). I got irritated by typing
all those cd commands at work. I wanted something like
NCD but then for Unix. Therefore I made this program.

Jason Mathews made a portable CHDIR function which works
for DOS, VMS and Unix. (I only tested DOS and Unix.)

The 'cd' or 'chdir' command is a shell-command. It are
not executable programs that you find somewhere on disk.

Unix shells, that I know of, behave different compared
to the DOS-shell if a program changes directory.
In DOS the DOS-shell stays in the last directory where the
program has changed to.
In Unix the Shell returns to the directory where you started
the program. So using Jason's CHDIR function didn't work
for WCD in Unix. You ended always back in the directory where
you started WCD.

But there is a workaround:
If you execute the 'cd' command via a shell-script it
is possible to let the Shell from where you executed
the script stay in that directory.
In the Korn Shell (ksh) you do that by typing a dot '.'
before the script.
In the C Shell (csh) and Bourne Again Shell (bash)
you do that by typing 'source' in front of the script.
WCD for Unix generates the shell-script. The
preceding '.' or 'source' command is provided via
a function or an alias.  See also file wcd.txt.

Example:
Let's assume you want to jump to directory /home/waterlan/src/wcd.

$ wcd.exe wc

wcd.exe generates a shell-script 'wcd.go' with the contents:

cd "/home/waterlan/src/wcd"

To change to the directory you type in the Korn Shell:
$ . wcd.go
or in the C or Bourne Again Shell:
$ source wcd.go

This is the workaround I use in the Unix version of WCD.
More details about how to install wcd in the ksh, csh or bash
are in file wcd.txt.


Erwin Waterlander
    waterlan@xs4all.nl
or  waterlan@natlab.research.philips.com



