* AUTO_CD
@ 2006-10-06 18:35 Dave Yost
2006-10-06 19:49 ` AUTO_CD Andrey Borzenkov
0 siblings, 1 reply; 7+ messages in thread
From: Dave Yost @ 2006-10-06 18:35 UTC (permalink / raw)
To: zsh-workers
Hi.
There should be a way to get something like AUTO_CD but that does a pushd.
Thanks
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: AUTO_CD
2006-10-06 18:35 AUTO_CD Dave Yost
@ 2006-10-06 19:49 ` Andrey Borzenkov
2006-10-06 20:18 ` AUTO_CD Dave Yost
[not found] ` <pdy98830624062fc14c69e22b5a@192.168.1.2>
0 siblings, 2 replies; 7+ messages in thread
From: Andrey Borzenkov @ 2006-10-06 19:49 UTC (permalink / raw)
To: zsh-workers; +Cc: Dave Yost
-----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'?
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFJrMxR6LMutpd94wRAl24AJ9+1xMjpaFd3rm+/CdgIpXi/CrQ8gCfTLpl
fCqRgYULU9v0YLOUknmAJmI=
=ZsZg
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: AUTO_CD
2006-10-06 19:49 ` AUTO_CD Andrey Borzenkov
@ 2006-10-06 20:18 ` Dave Yost
2006-10-06 20:37 ` AUTO_CD Frank Terbeck
[not found] ` <pdy98830624062fc14c69e22b5a@192.168.1.2>
1 sibling, 1 reply; 7+ messages in thread
From: Dave Yost @ 2006-10-06 20:18 UTC (permalink / raw)
To: zsh-workers
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'?
>
> -andrey
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: AUTO_CD
[not found] ` <pdy98830624062fc14c69e22b5a@192.168.1.2>
@ 2006-10-06 20:36 ` Vin Shelton
2006-10-06 23:45 ` AUTO_CD Dave Yost
0 siblings, 1 reply; 7+ messages in thread
From: Vin Shelton @ 2006-10-06 20:36 UTC (permalink / raw)
To: Dave Yost; +Cc: zsh-workers
$ zsh -f
$ ls -d software
software
$ software
zsh: command not found: software
$ setopt autocd
$ software
$ pwd
/e/acs/software
$ dirs
~/software
$ cd
$ setopt autopushd
$ software
$ dirs
~/software ~
Case and underscore are ignored in option names.
- Vin
On 10/6/06, Dave Yost <Dave@yost.com> wrote:
> 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'?
> >
> > -andrey
>
> 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.
>
--
Whoever you are, no matter how lonely,
the world offers itself to your imagination,
calls to you like the wild geese, harsh and exciting--
over and over announcing your place
in the family of things. Mary Oliver
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: AUTO_CD
2006-10-06 20:18 ` AUTO_CD Dave Yost
@ 2006-10-06 20:37 ` Frank Terbeck
0 siblings, 0 replies; 7+ messages in thread
From: Frank Terbeck @ 2006-10-06 20:37 UTC (permalink / raw)
To: zsh-workers
Dave Yost <Dave@Yost.com>:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: AUTO_CD
2006-10-06 20:36 ` AUTO_CD Vin Shelton
@ 2006-10-06 23:45 ` Dave Yost
2006-10-07 2:01 ` AUTO_CD Bart Schaefer
0 siblings, 1 reply; 7+ messages in thread
From: Dave Yost @ 2006-10-06 23:45 UTC (permalink / raw)
To: zsh-workers
At 04:36 PM -0400 2006-10-06, Vin Shelton wrote:
>$ zsh -f
>$ ls -d software
>software
>$ software
>zsh: command not found: software
>$ setopt autocd
>$ software
>$ pwd
>/e/acs/software
>$ dirs
>~/software
>$ cd
>$ setopt autopushd
>$ software
>$ dirs
>~/software ~
Yes, but autocd goes beyond what is desired: it makes every cd into a pushd.
$ ls -d foo
foo
$ cd foo
$ dirs
~/software/foo ~/software ~
>Case and underscore are ignored in option names.
Good to know.
Dave
>
> - Vin
>
>On 10/6/06, Dave Yost <Dave@yost.com> wrote:
>>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'?
>>>
>>> -andrey
>>
>>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.
>>
>
>
>--
>Whoever you are, no matter how lonely,
>the world offers itself to your imagination,
>calls to you like the wild geese, harsh and exciting--
>over and over announcing your place
>in the family of things. Mary Oliver
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: AUTO_CD
2006-10-06 23:45 ` AUTO_CD Dave Yost
@ 2006-10-07 2:01 ` Bart Schaefer
0 siblings, 0 replies; 7+ messages in thread
From: Bart Schaefer @ 2006-10-07 2:01 UTC (permalink / raw)
To: zsh-workers
On Oct 6, 4:45pm, Dave Yost wrote:
}
} Yes, but autocd goes beyond what is desired: it makes every cd into a
} pushd.
Viz:
setopt auto_cd auto_pushd
cd chdir () { setopt localoptions no_auto_pushd; builtin cd "$@" }
(One of the rare instances where defining two functions at once makes
some sort of sense.)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-10-07 2:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-06 18:35 AUTO_CD Dave Yost
2006-10-06 19:49 ` AUTO_CD Andrey Borzenkov
2006-10-06 20:18 ` AUTO_CD Dave Yost
2006-10-06 20:37 ` AUTO_CD Frank Terbeck
[not found] ` <pdy98830624062fc14c69e22b5a@192.168.1.2>
2006-10-06 20:36 ` AUTO_CD Vin Shelton
2006-10-06 23:45 ` AUTO_CD Dave Yost
2006-10-07 2:01 ` AUTO_CD Bart Schaefer
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).