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

Re: persistant Directory history?



: On Tue, Nov 07, 2006 at 11:52PM +0000, Stephane Chazelas wrote:

> On Wed, Nov 08, 2006 at 12:18:12AM +0100, Francisco Borges wrote:
> > 1. it will fail if your directories have spaces in their names. To solve
> >    this you have to use "dirs -p" to put one dir per line, and use "f"
> >    to read them.
>
> You're only moving the problem to directories with newline in
> there names. See my approach (use ${(qq)dirstack} and ".").

Directories with new lines in their names... I must honestly say that I
had *never* given thought about it.

Anyway, if rc_expand_param is set, the "print -r [...]" line wont
work. So you should consider using

print -r "dirstack=(${(@qq)^^dirstack})"

to explicitly turn it off.
-- 
Francisco Borges



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