zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Dave Yost <Dave@yost.com>
Cc: zsh-workers@zsh.org
Subject: Re: RFE: DIR_PUSHD
Date: Fri, 30 Jul 2010 08:26:44 +0200	[thread overview]
Message-ID: <AANLkTik7EkY8JaE_jDy3EvkP=Vqg_0dqO1-4aTzkvKDa@mail.gmail.com> (raw)
In-Reply-To: <pdy98830624081dc877e5f4029d@192.168.1.2>

On 30 July 2010 04:16, Dave Yost <Dave@yost.com> 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


      parent reply	other threads:[~2010-07-30  6:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 19:25 Dave Yost
2010-07-29 20:37 ` Paul Ackersviller
2010-07-30  2:16   ` Dave Yost
     [not found]   ` <pdy98830624081dc877e5f4029d@192.168.1.2>
2010-07-30  6:26     ` Mikael Magnusson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTik7EkY8JaE_jDy3EvkP=Vqg_0dqO1-4aTzkvKDa@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=Dave@yost.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).