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

Re: why isn't IFS=$'\n' doing what I expect it to do here?



On Sat, Mar 23, 2013 at 11:09 PM, Phil Pennock <
zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:

>
> Is that closer?
>
> Note though that leading (and trailing) whitespace becomes significant.
>
> Similarly, you can use:
>   APPS=(${=${:-'
> for the first line, to actually split on $IFS, in which case changing
> IFS does affect parsing here.
>
> -Phil
>

If I do that then I can no longer use "$f[5]" to refer to the 5th _line_ …
I end up getting a single character instead of a line.

That said, at least I understand why it's not working as I expected it to.

For my purposes, I think "APPS=(" is fine, I'll just need to remember to
escape the \ or wrap everything in "

Thanks!

TjL


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