zsh-users
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: Discrepancy in IFS handling (zsh is *not* POSIX compliant)
Date: Thu, 30 Mar 2023 09:09:00 -0600	[thread overview]
Message-ID: <CAMP44s0OgEcHuuGJn+_dB-1weLkUARxZPg-JCDztNGQi23fFiw@mail.gmail.com> (raw)
In-Reply-To: <450942bd-dc7e-0d8b-7cf3-dbb52329ae99@eastlink.ca>

On Thu, Mar 30, 2023 at 8:49 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2023-03-30 05:10, Felipe Contreras wrote:
> > Seems weird that a variable called Internal Field Separator is not a
> > *separator*, but a terminator.
> >
> > I'm changing the subject to reflect that.

> Just some unwanted commentary:  Should one need to be a technical lawyer
> to decide this?  If one pointedly adds another
> separator/terminator/delimiter/ender or whatever one might call it, one
> has probably done so for a reason and that reason would almost
> inevitably be that one intends to add another field even if empty. Thus
> any shell the ignores such a character is throwing away syntax space and
> acceding to the idea that characters in code can be ignored -- which
> might in very limited situations be admissible but not very often.  So
> if zsh did other than it does and I crashed into that while writing
> something, I'd foam at the mouth.  So zsh is the good-guy here IMHO.
> Practicality should trump legality almost every time.

Yeah, I agree zsh's behavior is much more useful, but I'm not talking
about zsh's behavior by default, but in sh mode.

If POSIX seems to specify terminators instead of separators, and
that's what most shells do, shouldn't zsh in sh mode do the same?

-- 
Felipe Contreras


  reply	other threads:[~2023-03-30 15:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 11:11 Discrepancy in IFS handling (zsh is " Felipe Contreras
2023-03-30 12:05 ` Lawrence Velázquez
2023-03-30 12:10   ` Discrepancy in IFS handling (zsh is *not* " Felipe Contreras
2023-03-30 14:49     ` Ray Andrews
2023-03-30 15:09       ` Felipe Contreras [this message]
2023-03-30 15:31         ` Ray Andrews
2023-03-30 14:57     ` Bart Schaefer
2023-03-30 15:34       ` Felipe Contreras
2023-03-31 20:16   ` Discrepancy in IFS handling (zsh is " Felipe Contreras
2023-04-01 19:20     ` Lawrence Velázquez
2023-03-31 16:38 ` Thomas Paulsen
2023-03-31 20:18   ` Felipe Contreras

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=CAMP44s0OgEcHuuGJn+_dB-1weLkUARxZPg-JCDztNGQi23fFiw@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.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).