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

RE: Patterns in parameter substitution and quoting weirdness



> bor@itsrm2% foo[a\?]=a\?_val
> bor@itsrm2% print ${(v)foo[(I)a?]}
> bor@itsrm2% print ${(v)foo[(I)a\?]}
>        <= ... it is quoted by \ or '...'

Sorry, the problem is, of course, that I expect it to print `a?_val'.

>
> bor@itsrm2% bar='a?b'
> bor@itsrm2% print ${bar/a\?/ZZ}
> ZZb <= sorry? While I can understand it, why it differs from the subscript?
> bor@itsrm2% print "${bar/a?/ZZ}"
> ZZb <= if the above is correct, this is correct as well


Again, sorry - this is of course correct IF zsh behaves correctly and quotes
`?' and not treats it as glob in both cases. I cannot devise test to check it
currently.

-andrej



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