zsh-users
 help / color / mirror / code / Atom feed
From: TJ Luoma <luomat@gmail.com>
To: Zsh-Users List <zsh-users@zsh.org>,
	zsh-workers+phil.pennock@spodhuis.org
Subject: Re: why isn't IFS=$'\n' doing what I expect it to do here?
Date: Sat, 23 Mar 2013 23:27:46 -0400	[thread overview]
Message-ID: <CADjGqHtU3bNfYMdUCNGBpJsB-6gsq2boT6X3Qevwr8VF_U5PHg@mail.gmail.com> (raw)
In-Reply-To: <20130324030938.GA70966@redoubt.spodhuis.org>

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

On Sat, Mar 23, 2013 at 11:09 PM, Phil Pennock <
zsh-workers+phil.pennock@spodhuis.org> 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

  reply	other threads:[~2013-03-24  3:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-24  2:01 TJ Luoma
2013-03-24  3:09 ` Phil Pennock
2013-03-24  3:27   ` TJ Luoma [this message]
2013-03-24  4:46     ` Phil Pennock
2013-03-24  3:47 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADjGqHtU3bNfYMdUCNGBpJsB-6gsq2boT6X3Qevwr8VF_U5PHg@mail.gmail.com \
    --to=luomat@gmail.com \
    --cc=zsh-users@zsh.org \
    --cc=zsh-workers+phil.pennock@spodhuis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).