Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Discrepancy in IFS handling (zsh is *not* POSIX compliant)
On Thu, Mar 30, 2023 at 8:49 AM Ray Andrews <rayandrews@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author