Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: parameter and quoting (was: Re: Completion problems.)
- X-seq: zsh-workers 7382
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Sven Wischnowsky" <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: PATCH: parameter and quoting (was: Re: Completion problems.)
- Date: Thu, 5 Aug 1999 18:41:23 +0400
- Importance: Normal
- In-reply-to: <199908051426.QAA17397@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> Then Andrej Borsenkow wrote:
>
> > Unfortunately, Single UNIX requires, that quotes be matched. This
> is from the
> > description of double-quotes:
> >
> > ==
> > Within the string of characters from an enclosed ${ to the matching
> "}", an even
> > number of unescaped double-quotes or single-quotes, if any, must occur.
> > ==
> >
> > It means, that preceding example MUST be
> >
> > echo "${a%\'}"
>
> Damn, I just had the patch... but even if we decide to follow the
> standard and not ksh here, it will be easier with this patch.
>
Ehem ... reading it a bit more closely, it is still ambiguous. Single UNIX
explicitly diallows "${foo%'}" - but it does not tell us, how to actually escape
single quote in this case. Another line in the same paragraph says:
==
The backslash retains its special meaning as an escape character (see Escape
Character (Backslash) ) only when followed by one of the characters:
$ ` " \ <newline>
==
OTOH it contains valid example:
unset bar
foo="${bar-\}}"
This implies, that in "${...}" backslash quotes } and (probably) ' ... horrors.
Anybody has better description?
/andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author