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

RE: PATCH: parameter and quoting (was: Re: Completion problems.)



>
> The first possibility sounds sensible to me, too, since ksh allows
> you to do
>
>   a="'"
>   echo "${a%'}"
>
> although bash complains as well.  It's probably a grey area, since the
> single UNIX specification says
>

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%\'}"

/andrej



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