From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1169 invoked from network); 23 Mar 2006 21:08:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Mar 2006 21:08:37 -0000 Received: (qmail 64115 invoked from network); 23 Mar 2006 21:08:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Mar 2006 21:08:28 -0000 Received: (qmail 18261 invoked by alias); 23 Mar 2006 21:08:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10064 Received: (qmail 18251 invoked from network); 23 Mar 2006 21:08:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Mar 2006 21:08:21 -0000 Received: (qmail 63138 invoked from network); 23 Mar 2006 21:08:21 -0000 Received: from dep.let.rug.nl (129.125.8.60) by a.mx.sunsite.dk with SMTP; 23 Mar 2006 21:08:19 -0000 Received: from dep.let.rug.nl ([129.125.8.60]) by dep.let.rug.nl (SMSSMTP 4.1.11.41) with SMTP id M2006032322081805381 for ; Thu, 23 Mar 2006 22:08:18 +0100 Received: from loki (postfix@loki.let.rug.nl [129.125.8.86]) by dep.let.rug.nl (8.12.10/8.12.10) with ESMTP id k2NL8HFT002571 for ; Thu, 23 Mar 2006 22:08:17 +0100 (MET) Received: by loki (Postfix, from userid 7006) id 9D51DE7AC; Thu, 23 Mar 2006 22:08:35 +0100 (CET) Date: Thu, 23 Mar 2006 22:08:34 +0100 From: Francisco Borges To: Zsh User Subject: cd - and $OLDPWD, bug in the manual? Message-ID: <20060323210833.GA2891@let.rug.nl> Mail-Followup-To: Zsh User Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Linux/2.6.13.4 (i686) X-Editor: GNU Emacs 22.0.50.1 Organization: Alfa Informatica - Rijksuniversiteit Groningen User-Agent: Mutt/1.5.9i X-Whitelist: OK X-Scanned-By: milter-spamc/0.25.321 (dep.let.rug.nl [129.125.8.60]); Thu, 23 Mar 2006 22:08:18 +0100 Hello all, Some weeks ago I received lot's of help and comments a question about "dirstack history". Thanks a lot. Now I'm not only happier, I'm also a bit lazier. [...] Sometimes (but not all the time) I want to login and go immediately to the last dir I was before logging out. Which I could do using "% cd -1", but lazy as I am, I tried to do % cd - and this failed... I checked the manual and it says: cd [ -sLP ] {+|-}n [...] specified. If arg is `-', change to the value of $OLDPWD, the previous directory. I tried setting OLDPWD, but "% cd -" would still not work. This time I actually took a look into the code and indeed, "cd -" is not using $OLDPWD, just a variable whose value should be reflected into the value of $OLDPWD. Do you guys agree with me that either the manual or Src/builtin.c:cd_get_dest need to change? Cheers, Francisco