From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id BAA21770 for ; Sat, 11 May 1996 01:37:19 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA12510; Fri, 10 May 1996 11:21:01 -0400 (EDT) Resent-Date: Fri, 10 May 1996 11:21:01 -0400 (EDT) From: Anthony Heading Message-Id: <199605101519.QAA09137@et-sun4.uk.jpmorgan.com> Subject: Re: Directory stack and pushd/popd in zsh-2.6-beta17 To: jussa@lenkkari.cs.tut.fi (Juha Leskel{) Date: Fri, 10 May 1996 16:19:38 +0100 (BST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <199605100951.AA157121909@lenkkari.cs.tut.fi> from "Juha Leskel{" at May 10, 96 12:51:48 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"h-_Dl.0.L33.Sxran"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1048 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > Then to questions. I noticed that in this release popd builtin doesn't work > as it used to. It really doesn't change the working directory. I tried it > with and without pushd command ( I have autopushd option set ), but the > result was the same. I also tried to unset autopushd option and without my > chpwd function. I checked what is happening to the directory stack and > here is something funny: > Shoot! This is my fault I think. At least it seems to be if you have CHASE_LINKS set. The problem appears to be that I changed cd_get_dest to return the "targetted" entry on the directory stack. For cd and pushd this is fine. But for popd, that's the directory to be killed, not to be changed to. So the code is going through the machinations of changing to this wrong dir, but the day is saved in bin_cd(), which actually changes to the correct dir, *except* if CHASE_LINKS is set. I'll try to work out a fix this weekend. It might involve restructuring that whole section of code, since the way it's split into multiple functions is actually rather unhelpful. Just in case I'm about to screw up, could someone tell me what that code at the end of bin_cd() ( stat() and stat() and notequal and chdir() ) is supposed to catch? I can't see why the previous functions shouldn't do the job properly. Sorry about this. Any input or suggestions from anyone who cares to look at it happily taken on board... Anthony