Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [zsh] Re: dirstack history: loving zsh, crashing zsh...



» On Sun, Mar 05, 2006 at 01:19AM -0800, Bart Schaefer wrote:

> Since no one else has pointed it out yet, the Right Thing here is
>
> 	setopt pushd_ignore_dups

I have pushd_ignore_dups set, it won't stop that accumulation of
repeated directories at .zdirs (essentially since "dirs" always include
the CWD).

> 	dirstack=( ${(u)$(< ~/.zdirs)} )

But the "u" parameter solves it indeed! Thank you very much for pointing
it.

> } OR you guys are now going to say: "Don't you know you're not supposed
> } to use typeset with dirstack!!"
>
> You aren't, but the shell isn't supposed to crash, either.

Is there any reason for why? I assumed I could treat dirstack as any
other array since, well, the *manual* says dirstack is "a normal array".

Anyway, the problem is solved. Thanks again!

Francisco.



Messages sorted by: Reverse Date, Date, Thread, Author