From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29838 invoked from network); 29 Sep 1999 03:30:00 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 1999 03:30:00 -0000 Received: (qmail 6826 invoked by alias); 29 Sep 1999 03:29:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8089 Received: (qmail 6818 invoked from network); 29 Sep 1999 03:29:48 -0000 From: "Bart Schaefer" Message-Id: <990929032944.ZM21831@candle.brasslantern.com> Date: Wed, 29 Sep 1999 03:29:44 +0000 In-Reply-To: Comments: In reply to Zefram "Re: cd, pwd and symlinks" (Sep 28, 6:42pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: cd, pwd and symlinks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 28, 6:42pm, Zefram wrote: } Subject: Re: cd, pwd and symlinks } } Bart Schaefer wrote: } >On Sep 28, 12:07pm, Peter Stephenson wrote: } >} There's some reason why the code was changed } >} to do all changes with absolute path --- maybe to simplify it, hur hur. } > } >As far as I can tell, this is something Zefram changed between 3.1.2 and } >3.1.3, for which no patch was ever posted. } } I'm pretty sure it's not. That's one of the areas of the shell that I } studiously avoided changing. Ah. Further investigation reveals that this was already changed in 3.1.0; I've checked the RCS files from that version that are on the FTP site. So the next best guess is that Zoltan changed this; see the ChangeLog entry for Thu Dec 5 03:59:45 1996, "Lots of other stuff." } Given that we have to support [PWD], there are basically two sensible } ways for it to work: } } 1. cd maps directly onto chdir(), doing everything the way the } filesystem says. } } 2. $PWD is the shell's canonical idea of its current directory. cd with } a relative pathname does text substitution using $PWD, and then does } a chdir() to the resulting absolute pathname. I generally agree with this viewpoint, but: } Until 3.1.6, we had a pretty consistent 2. I don't really agree with that last, the problem being that other parts of the shell (particularly completion) didn't pay attention to the same rules, which could lead to all sorts of odd stuff. I'm not sure we've completely (ahem) fixed that, even yet. Certainly there should be at least ONE mode in which "cd .." simply does chdir(".."), and right now NO mode does so (even after PWS's patch). I don't believe any of 3.1.<0-5> did this correctly either. } Now we have a mixture of the two styles, which isn't working, and } making it more complicated isn't going to help. Let's just have the } two ways of working, with an option to switch between them. This is essentially my feeling too, except that I think we can do better in the failure cases. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com