Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: persistant Directory history?
- X-seq: zsh-users 10957
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Zsh User <zsh-users@xxxxxxxxxx>, chesss <testingagain@xxxxxxxxx>
- Subject: Re: persistant Directory history?
- Date: Wed, 8 Nov 2006 11:19:05 +0000
- In-reply-to: <20061108104118.GA15543@xxxxxxxxxx>
- Mail-followup-to: Zsh User <zsh-users@xxxxxxxxxx>, chesss <testingagain@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <5db995410611060845y53f673e6je029a9c60659f116@xxxxxxxxxxxxxx> <20061107145231.GA8117@xxxxxxxxxx> <5db995410611071219q77820cfeg931ac950f744a276@xxxxxxxxxxxxxx> <20061107231812.GA14067@xxxxxxxxxx> <20061107235213.GA5829@sc> <20061108104118.GA15543@xxxxxxxxxx>
- Sender: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
On Wed, Nov 08, 2006 at 11:41:18AM +0100, Francisco Borges wrote:
> : 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})"
[...]
rc_expand_param is likely to break many things. And other
options are likely to break other things.
A better approach is probably to use emulate -L zsh, for code
you want to share with anyone that might have a different option
setting as yours.
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author