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

Re: permission denied



On Thu, Apr 20, 2023 at 3:47 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> Ah!  '(z)' takes care not to split within quotes.  Sheesh, why doesn't
> the manual just say that?

Because that's not all it does.  The first part of the sentence --
"Split the result of the expansion into words using shell parsing" --
is the important bit.  (The "i.e." in "i.e. taking" should probably be
an "e.g." as it is only one example of what happens.)

$=x only splits on spaces.  (z) gives you a separate word for each
shell token, so e.g. "<file" becomes the two words "<" and "file", and
"echo foo;" becomes 3 words "echo", "foo", and ";", and so on.




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