Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Quoted parameter parsing glitch
- X-seq: zsh-workers 15679
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: Quoted parameter parsing glitch
- Date: Wed, 22 Aug 2001 16:59:04 +0000
- In-reply-to: <006601c12b26$73edf210$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <006601c12b26$73edf210$21c9ca95@xxxxxxxxxxxxxx>
On Aug 22, 8:21pm, Borsenkow Andrej wrote:
} Subject: RE: Quoted parameter parsing glitch
}
} > schaefer<502> print "${foo:-"}"
} > dquote braceparam>
} >
} > At this point the parser is in an infinite loop.
I'm wrong, it's either more complicated than that example shows or it's
just me. It's possible to get out of that one by just:
schaefer<502> print "${foo:-"}"
dquote braceparam> }
dquote> "
}
schaefer<503>
I'm pretty sure I did manage to get it stuck on a more complicated
substitution, but my attempt to produce a minimal example went astray,
and I haven't reproduced whatever it was I first did.
} Shell should not hang, but please note it is invalid as per POSIX.
} Double-quotes and braces must match.
Zsh 4 (and ksh) is supposed to accept double-quotes inside ${...} inside
double-quotes; the braces act as an extra level of quoting so that the
inner quotes can nest in the outer ones. I don't know what POSIX says
about that.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author