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?
- X-seq: zsh-users 17732
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>, zsh-workers+phil.pennock@xxxxxxxxxxxx
- Subject: Re: why isn't IFS=$'\n' doing what I expect it to do here?
- Date: Sat, 23 Mar 2013 23:27:46 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=1q0TvjTbLqiNJ6cJPQNGv3PMqIzJqdxUmpX7fjtrLLY=; b=BnE6pJIhIw5xCPUVUBPkAZJL5b8YISzJcKKvuE48E0eQnAGPhGDjjLC8OZY5jrjdAZ 9rX8CdF2svrvxXhrHwdvu9+gskrjMc2+/NzqpatXOSrSXEI18msiqhei7sy+G/roD2zo 1rXskRS6ilarC2R9RxCah6d8cIIOPLVIKqIRJcKcdL2D56xVz5mq8gsRPVXCKG5tZrAf kKzfsUR9aSk7/j1lrGwswXzQjZip+DlROUFR1aHWICLDUtV1ljeDyzUP01Hpzpmv9dCk pbFlShIkMkgUXZ4t2S3jB/Ju3xfOmOKfscC97NzlCLO+jCh6Av5wdEEbxbHF9Pb82SaR xejg==
- In-reply-to: <20130324030938.GA70966@redoubt.spodhuis.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHsO-Ysi5KWwLU_SwkGJubcMsM-rFmBvfHw7Fq5ZsuyErg@mail.gmail.com> <20130324030938.GA70966@redoubt.spodhuis.org>
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