zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: shwordsplit: final non-whitespace IFS character problem
Date: Fri, 04 Aug 2017 12:13:38 +0100	[thread overview]
Message-ID: <20170804121338.2509e5a8@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20170804105601.GA10499@chaz.gmail.com>

On Fri, 4 Aug 2017 11:56:01 +0100
Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> 2017-08-04 04:03:19 +0200, Martijn Dekker:
> > In field/word splitting, a final non-whitespace IFS delimiter character
> > is counted as an empty field. This is unlike every other current shell
> > (including current versions of pdksh, i.e. mksh and OpenBSD ksh).
> > 
> > Test script:
> > 
> > setopt shwordsplit
> > IFS=:
> > x=a:b:
> > set -- $x
> > echo $#
> [...]
> 
> IIRC, it was discussed before, and the concensus at the time was
> that it would be silly as the S in IFS stands for *S*eparator, not
> terminator nor delimiter.

Clearly it's not a good idea to change this in native mode.

> I can't imagine changing the behaviour in the sh/ksh emulations
> would be a problem (though I still think it's silly).

If everyone else does it, we should follow there.  I guess POSIX_STRINGS
is as sensible an option to use as anything (though previous disclaimers
on partial use of POSIX options apply).

Not sure this is going to get done before the release.

pws


  reply	other threads:[~2017-08-04 11:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04  2:03 Martijn Dekker
2017-08-04 10:56 ` Stephane Chazelas
2017-08-04 11:13   ` Peter Stephenson [this message]
2017-08-06 18:08 ` Peter Stephenson
2017-08-06 20:01   ` Peter Stephenson
2017-08-08 10:56     ` Kamil Dudka
2017-08-08 12:17       ` Peter Stephenson

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=20170804121338.2509e5a8@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@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).