Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible bug with parameter expansion
- X-seq: zsh-workers 13606
- From: Oliver Kiddle <opk@xxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Possible bug with parameter expansion
- Date: Mon, 12 Mar 2001 13:13:52 +0000
- In-reply-to: <1010308163315.ZM25025@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Thu, Mar 08, 2001 at 04:33:15PM +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010307113659.A13689@xxxxxxxxxxxxxxxxxx> <1010308163315.ZM25025@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: Oliver Kiddle <kiddleo@xxxxxxxxxx>
On Thu, Mar 08, 2001 at 04:33:15PM +0000, Bart Schaefer wrote:
> If you read Peter's 11-step "summary of the rules for substitution" you
> will see that (4. *Double-Quoted Joining*) comes before (6. *Modifiers*).
fair enough. Thanks.
> Because they do. I don't recall why joining happens before modifiers,
> but I'm pretty sure there was a good reason for it at the time. Does
> this disagree with other shells that support ${var#pat}, e.g. ksh?
In ksh, there is no way I know of making var refer to an array because it
expands to the first element of the array and with [@], you get a bad
substitution.
Comparing with bash, I have to use [@] to get an array before the
modifier. With the [@], both bash and zsh work the same regardless of
quotes. So basically, I haven't been able to create a comparable situation
in bash or ksh.
I still think the behaviour seems odd mainly because I'm used to reading
these substitutions from the inside out and the double quotes are on the
outside.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author