home *** CD-ROM | disk | FTP | other *** search
- CHD : directory changing utility by John H. DuBois III v1.2
- Usage: chd [<drive>:][<dir>][<control char>]
- <drive> specifies the drive on which the current dir is to be changed.
- <dir> specifies the dir to be changed to. Wildcards can be given. If <dir>
- is ended with a control char, like ^D, then a '*' will be added to the name
- part of <dir> and, if an extension is given, to the extension part of
- <dir>. Thus, only a unique prefix of the target dir need be given. If an
- environment variable "dnc" is set, the sense of this is reversed: wildcards
- will be added by default, but will not be if <dir> is ended with a control
- char.
- If <dir> is a subdirectory of the current dir, the current dir is changed to
- <dir>. Otherwise, if environment variable CDPATH is defined, an attempt is
- made to find <dir> as a subdir of the directories given in that var. The
- directories in CDPATH should be given in the same format that they are in
- the PATH env var. The dirs in CDPATH are searched from the leftmost dir to
- the rightmost, and the first dir which has <dir> as a subdir is used (its
- subdir <dir> becomes the current dir). If a dir in CDPATH includes a drive
- specification, it will be considered only if the current drive matches that
- specification.
- If the dir changed to was found in one of the dirs in CDPATH, rather than
- in the current dir, then the full path of the dir changed to is printed.
- If both a drive and a dir are given, an attempt will be made to change the
- current dir on the specified drive to <dir>. The attempt will fail if
- <dir> is not a subdir of the current dir on the specified drive.
- If the current dir does not have <dir> as a subdir, and either CDPATH is not
- defined or none of the dirs in it have <dir> as a subdir, then an error
- message is printed.
- If CHD is executed without an argument, the full path of the current dir is
- printed. If it is executed with only a drive name as an argument, the full
- path of the current dir on that drive is printed.
-
- Revision history:
- 1.0 : 8/87
- 1.1 : 11/87 : Added wildcard capability.
- 1.2 : 12/87 : Added DNC env var interpretation.
-
- Send bug reports, suggestions, and comments to
- John DuBois, spcecdt@ucscb.ucsc.edu
-