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

Re: syntax question



On Wed, Mar 21, 2018 at 4:15 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> ${${(z)string}[1]}
>
> ${(z)string[1]}
>
> ... How can that mean anything different?

Operator precedence.  The second one is equivalent to
${(z)${string[1]}}, as you observed.



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