Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!voder!pyramid!ctnews!risky!chrisb From: chrisb@risky.Convergent.COM (Chris Bertin) Newsgroups: comp.unix.shell Subject: ksh's cd tries to do too much Message-ID: <3604@risky.Convergent.COM> Date: 21 Mar 91 18:13:12 GMT Organization: Convergent Technologies, San Jose, CA Lines: 34 Ksh does some pre-parsing on the argument to 'cd'. It removes from the argument all the '..' and the name before the '..' (for optimization, I guess): cd _not_a_directory/../_junk_/.. has no effect, even though 2 directories in the argument don't exist. The problem is that if you type: cd _valid_CDPATH_directory/.. it has no effect either and I think that's a bug. $ echo $CDPATH :/a/b/c $ cd /a/b/c/d $ pwd /a/b/c/d $ cd / $ ls d d: No such file or directory $ cd d/.. $ pwd / This works with /bin/sh (the shell would put me in /a/b/c) and I didn't find anything in the man page that would mention this as a 'feature'. Chris -- Chris Bertin | chrisb@risky.Convergent.COM Unisys | or (408) 435-3762 | ...!uunet!pyramid!ctnews!risky!chrisb