From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3837 invoked by alias); 30 Jul 2010 06:33:12 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28109 Received: (qmail 13516 invoked from network); 30 Jul 2010 06:33:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=nWp0W5mq4nxhSS4M0aC/49YPangJ3zhrmrbifvww6IA=; b=h/jAqObBfIotk26eBagHA/JILzXoc+GUNiyMHLCSCFvx4zMn0bk3v5rRm5MOHXZQ8O TgLbwr7fosi40pXvYxK84uoxh61TRHXbQFh7v/ZBd3QA5FiiZO6jWIZPa9ZKgn/BnUMl NW1XGLB9ZEg8zVdO7SDMND3Qxk+gpaopoBw2w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=JMaYTiZIlLGiH3fDLES+t5V41zLed5DCE0r9AnvIMJ5Pkv1u5Hkxzh3sJ6lHu9EyeI bLWnw1WhRoJ5fk1JkY0Mg0glQXITjW2AL9Gxi/M7KPReLCi4W/D3UVXqX3ffFxWhJ5hb vAJbPZgfft8eCF8Ygqdrc6NJF1W79YLashMtY= MIME-Version: 1.0 In-Reply-To: References: <20100729203749.GA21812@sverige> Date: Fri, 30 Jul 2010 08:26:44 +0200 Message-ID: Subject: Re: RFE: DIR_PUSHD From: Mikael Magnusson To: Dave Yost Cc: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 On 30 July 2010 04:16, Dave Yost wrote: > At 8:37 PM +0000 2010-07-29, Paul Ackersviller wrote: >>On Thu, Jul 29, 2010 at 12:25:23PM -0700, Dave Yost wrote: >>> AUTO_CD is nice, but I find it would usually be better if >>> "executing" a directory would instead pushd to that directory. >>> >>> The obvious name for such an option would be AUTO_PUSHD, but that >>> name is already in use for something else. >> >>Perhaps I'm missing something, but does AUTO_PUSHD in conjunction with >>AUTO_CD not already do what you want? That's what I always set, and I'm >>a happy pushd-er. > > If I set both AUTO_CD and AUTO_PUSHD, then > 1. If I execute a dir, zsh will pushd to that dir, so far, so good. > 2. If I say "cd /tmp", zsh will pushd to /tmp, not desired behavior > > I want only #1 How about function cd() { setopt localoptions noautopushd builtin cd "$@" } -- Mikael Magnusson