Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fwd: more splitting travails
- X-seq: zsh-users 29462
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Fwd: more splitting travails
- Date: Fri, 12 Jan 2024 20:54:55 -0800
- Archived-at: <https://zsh.org/users/29462>
- In-reply-to: <CAH+w=7Ye=RB3p5TTvYxpwfFTQVXao6xz8w9JX-O5yKGONEgrzg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <ca1761f1-6d8f-452a-b16d-2bfce9076e25@eastlink.ca> <CAH+w=7ZJsr7hGRvD8f-wUogPcGt0DMOcPyiYMpcwCsbBNkRwuQ@mail.gmail.com> <CAA=-s3zc5a+PA7draaA=FmXtwU9K8RrHbb70HbQN8MhmuXTYrQ@mail.gmail.com> <CAH+w=7bAWOF-v36hdNjaxBB-5rhjsp97mAtyESyR2OcojcEFUQ@mail.gmail.com> <205735b2-11e1-4b5e-baa2-7418753f591f@eastlink.ca> <CAH+w=7Y5_oQL20z7mkMUGSLnsdc9ceJ3=QqdAHVRF9jDZ_hZoQ@mail.gmail.com> <c5e837b0-18e1-4b25-bdc3-57b420f24325@eastlink.ca> <CAH+w=7Ye=RB3p5TTvYxpwfFTQVXao6xz8w9JX-O5yKGONEgrzg@mail.gmail.com>
On 2024-01-12 19:59, Bart Schaefer
wrote:
The outermost parens say that you are ASSIGNING TO an array, not WHAT
you are assigning to it.
Ah! Output, not input. Obvious now that you mention it.
> But ... aaa is not the name of an array, after the foregoing "read".
Or if it somehow is, we're back to an array of one element where that
element has all the newlines within.
Well, Roman will be glad to hear that I was just about to do a typeset -p on both versions to see the difference. I'll have to think about it, but for now what matters is just that I see it correctly, even if that's via a cheat -- it shows the array as it is even if via a somewhat strange route.
0 /aWorking/Zsh/Source/Wk 0 % typeset -p vvar
typeset -a vvar=( 'one two' three '' four '' 'five six seven' '' '' eight )
0 /aWorking/Zsh/Source/Wk 0 % typeset -p aaa
typeset aaa=$'one two\nthree\n\nfour\n\nfive six seven\n\n\neight'
I won't forget again.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author