From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21828 invoked from network); 17 Jun 2004 07:17:51 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 17 Jun 2004 07:17:51 -0000 Received: (qmail 2147 invoked from network); 17 Jun 2004 07:17:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jun 2004 07:17:37 -0000 Received: (qmail 8519 invoked by alias); 17 Jun 2004 07:17:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20068 Received: (qmail 8510 invoked from network); 17 Jun 2004 07:17:28 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 17 Jun 2004 07:17:25 -0000 Received: (qmail 1902 invoked from network); 17 Jun 2004 07:17:25 -0000 Received: from lakermmtao05.cox.net (68.230.240.34) by a.mx.sunsite.dk with SMTP; 17 Jun 2004 07:17:23 -0000 Received: from quark.hightek.org ([68.12.75.33]) by lakermmtao05.cox.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20040617071655.NUFO5935.lakermmtao05.cox.net@quark.hightek.org> for ; Thu, 17 Jun 2004 03:16:55 -0400 Received: by quark.hightek.org (Postfix, from userid 501) id 1F64F12422; Thu, 17 Jun 2004 02:17:07 -0500 (CDT) Date: Thu, 17 Jun 2004 02:17:07 -0500 From: Vincent Stemen To: zsh-workers@sunsite.dk Subject: Re: 'pushd +2' rotates rather than extracts Message-ID: <20040617071707.GA20062@quark.hightek.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Wed, Jun 16, 2004 at 10:13:13PM -0700, Bart Schaefer wrote: > According to the documentation (man zshbuiltins): > > The third form of pushd changes directory by rotating the > directory list. > > And then in Functions/Example/pushd, which unfortunately is not referenced > in the User Contributions section of the manual, one finds: > > # pushd function to emulate the old zsh behaviour. With this function > # pushd +/-n just lifts the selected element to the top of the stack > # instead of just cycling the stack. > Hmm. So it is intentional. I can see how the zsh behavior could be useful. I guess I need try it out for a while, now that I realize what it's doing, and see how I like it. I have found that when zsh does something different, it is usually (aways?) an improvement :-). Although, since it is a deviation from the traditional way of handling the directory stack, it might be a good idea to make it YAZO (Yet Another Zsh Option :-)) to be able to switch to the old behavior. If anything, it would make it better documented for others who don't know about it. The zshoptions manual is often the first place I look when I find something does not behave the way I expect. I almost always end up staying with the "improved" zsh behavior but it is often handy to have that choice. Also, just as a suggestion for improving the manual, just saying it rotates the directory list was not really clear to me that this is different from other shells. Perhaps it would be good to add an example similar to what Dave Yost wrote or to re-word it to clarify that, unlike other shells, it rotates the entire stack to the top rather than just the one entry. Regards, Vincent -- Vincent Stemen Avoid the VeriSign/Network Solutions domain registration trap! Read how Network Solutions (NSI) was involved in stealing our domain name. http://www.InetAddresses.net