From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24872 invoked from network); 6 Oct 2006 20:38:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Oct 2006 20:38:40 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 1723 invoked from network); 6 Oct 2006 20:38:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Oct 2006 20:38:34 -0000 Received: (qmail 25307 invoked by alias); 6 Oct 2006 20:38:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22825 Received: (qmail 25296 invoked from network); 6 Oct 2006 20:38:31 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 Oct 2006 20:38:31 -0000 Received: (qmail 1471 invoked from network); 6 Oct 2006 20:38:31 -0000 Received: from ms-2.rz.rwth-aachen.de (HELO ms-dienst.rz.rwth-aachen.de) (134.130.3.131) by a.mx.sunsite.dk with SMTP; 6 Oct 2006 20:38:26 -0000 Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0J6Q009HKENYVJ@ms-dienst.rz.rwth-aachen.de> for zsh-workers@sunsite.dk; Fri, 06 Oct 2006 22:38:22 +0200 (MEST) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Fri, 06 Oct 2006 22:38:21 +0200 (MEST) Received: from fsst.voodoo.lan ([212.117.84.63]) by relay.rwth-aachen.de (8.13.7/8.13.3/1) with ESMTP id k96KcLYm002925 for ; Fri, 06 Oct 2006 22:38:21 +0200 (MEST) Received: from hawk by fsst.voodoo.lan with local (Exim 4.63) (envelope-from ) id 1GVwRf-0001j0-9X for zsh-workers@sunsite.dk; Fri, 06 Oct 2006 22:37:23 +0200 Date: Fri, 06 Oct 2006 22:37:22 +0200 From: Frank Terbeck Subject: Re: AUTO_CD In-reply-to: To: zsh-workers@sunsite.dk Mail-followup-to: zsh-workers@sunsite.dk Message-id: <20061006203722.GA814@fsst.voodoo.lan> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline Operating-System: Linux 2.6.16.16 i686 User-Agent: Mutt/1.5.13 (2006-08-11) References: <200610062349.05354.arvidjaar@newmail.ru> Dave Yost : > At 11:49 PM +0400 2006-10-06, Andrey Borzenkov wrote: > >-----BEGIN PGP SIGNED MESSAGE----- > >Hash: SHA1 > > > >On Friday 06 October 2006 22:35, Dave Yost wrote: > >> Hi. > >> > >> There should be a way to get something like AUTO_CD but that does a pushd. > >> > > > >What about 'setopt autopushd'? > > Man zshall doesn't contain the string autopushd anywhere. I presume > you mean AUTO_PUSHD, which (as I read it) makes all cd commands act > like pushd. This is different from what I'm asking, though AUTO_PUSHD > is the name you would expect my request would use. % man 1 zshoptions [snip] SPECIFYING OPTIONS Options are primarily referred to by name. These names are case insen- sitive and underscores are ignored. For example, `allexport' is equiv- alent to `A__lleXP_ort'. [snap] If I understand your question correctly, this is what you want: [snip] zsh% dirs -v 0 ~ zsh% setopt autocd zsh% setopt autopushd zsh% /bin zsh% /usr/local zsh% /home/ftp zsh% ~ zsh% dirs -v 0 ~ 1 /home/ftp 2 /usr/local 3 /bin [snap] A autocd that does pushd. Regards, Frank