Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RFE: DIR_PUSHD
- X-seq: zsh-workers 28109
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Dave Yost <Dave@xxxxxxxx>
- Subject: Re: RFE: DIR_PUSHD
- Date: Fri, 30 Jul 2010 08:26:44 +0200
- Cc: zsh-workers@xxxxxxx
- 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=
- In-reply-to: <pdy98830624081dc877e5f4029d@xxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <pdy988306240815c87784cf7961@xxxxxxxxxxx> <20100729203749.GA21812@sverige> <pdy98830624081dc877e5f4029d@xxxxxxxxxxx>
On 30 July 2010 04:16, Dave Yost <Dave@xxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author