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

Re: Inconsistencies in "-quoting and @-splitting, could someone elaborate?



On Sun, Oct 28, 2018 at 8:41 AM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> (one could think that if a flag takes the responsibility for
> splitting in string-context ("-quoted), then that it will mimic the
> first tool to do that, the @)

Just to beat this entirely to death, you are wrong because that is NOT
WHAT @ DOES.

> 2.description) if ${(@)array} makes single-element quoted array back
> an array again, then shouldn't @ acting on single-element data (Bart
> said it's not array) returned by (z)/(s::) also make it an array
> again?

We could have done that instead of using (A), but it would have broken
historical behavior, so we did not.

> 3.description) Basically, the general method of Zshell to obtain
> scalars with no splits – double-quoting – isn't followed by (z) and
> (s::) flags.

Also explained in my first message.  Implicit joining occurs before
explicit splitting.

> The manuals often elaborate about some situations

This is spelled out in painful detail in the "Rules" subsection.



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