zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <Peter.Stephenson@csr.com>
To: <zsh-workers@zsh.org>
Subject: Re: Bug with bash emulation regarding ':'
Date: Mon, 20 Feb 2012 10:59:01 +0000	[thread overview]
Message-ID: <20120220105901.51cbbd22@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <120219154515.ZM7225@torch.brasslantern.com>

On Sun, 19 Feb 2012 15:45:15 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Hence it appears "we rely on the nested substitution to do the splitting
> we see in the top-level parameter expansion" is incorrect, at least in
> this instance?

That's good.  Maybe we're only relying on it to get the assigned value,
after all, so the splitting is done in the same order as bash (just
hitherto with different options applied at each stage).

> In fact it may be that PREFORK_SINGLE is the only thing needed there,
> and PREFORK_NOSHWORDSPLIT is extraneous?

The basic behaviour is certainly given with PREFORK_SINGLE only (spbreak
initialisation around line 1540); there's one oddity where we'll use
SHWORDSPLIT on its own to determine the default for (@) behaviour if not
forced on around line 1652.  That's rather confusing and my previous
change may already have had some impact on this, since we've reduced the
number of cases where SHWORDSPLIT is forced on.

> Although all tests still pass (except the new one introduced by 30203
> which must be tweaked), I should note the above changes the "native"
> zsh behavior as well.  I woudn't imagine this is going to cause much
> trouble -- I found no uses of ${...=...} in the default $fpath, which
> includes the whole completion suite, etc. -- but it does mean we might
> want to make it conditional upon something.  For example:

> +			    spbreak ? PREFORK_SINGLE : PREFORK_NOSHWORDSPLIT,

I suppose that's as good as anything.  Goodness knows how to document
this.  I'm not sure I really understand how the ramifications of one
option cause so much divergence internally, but as far as I can see (and
I can't, really) that should cover the two obvious cases where
SHWORDSPLIT is or is not on at the top level.  Whether it covers
explicit splitting in nested substitutions or (@) processing is another
matter.

However, given we don't tend to rely on ${...=...}, and the shenanigans
with parameter flags don't apply to POSIX, it doesn't seem worth doing
any more research, so I think this is probably as good as we need.
Thanks.

It might be worth folding this in and making 4.3.17 immediately, there's
no real point in releasing only a partial fix.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog


  parent reply	other threads:[~2012-02-20 11:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-29  2:46 Felipe Contreras
2012-01-29  5:31 ` Benjamin R. Haskell
2012-01-29 13:44   ` Felipe Contreras
2012-01-29 14:25     ` Mikael Magnusson
2012-01-29 14:27       ` Mikael Magnusson
2012-01-29 18:38       ` Vincent Lefevre
2012-01-29 18:53         ` Mikael Magnusson
2012-01-29 19:01           ` Vincent Lefevre
2012-01-29 20:30             ` Peter Stephenson
2012-01-29 21:05               ` Mikael Magnusson
2012-01-30 22:15       ` Felipe Contreras
2012-01-30 22:18         ` Mikael Magnusson
2012-01-29 18:36 ` Peter Stephenson
2012-02-01  4:29   ` Bart Schaefer
2012-02-01 16:29     ` Bart Schaefer
2012-02-05 20:11       ` Peter Stephenson
2012-02-05 21:21         ` Bart Schaefer
2012-02-10 21:04           ` Peter Stephenson
2012-02-11 21:08             ` Bart Schaefer
2012-02-12 20:29               ` Peter Stephenson
2012-02-14 17:41         ` Peter Stephenson
2012-02-14 23:30           ` Chet Ramey
2012-02-15 12:36             ` Peter Stephenson
2012-02-19 23:45               ` Bart Schaefer
2012-02-20  8:48                 ` Bart Schaefer
2012-02-20 10:59                 ` Peter Stephenson [this message]
2012-02-20 17:09                   ` Bart Schaefer
2012-01-30 19:22 ` Felipe Contreras
2012-02-10 11:08 Jilles Tjoelker

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=20120220105901.51cbbd22@pwslap01u.europe.root.pri \
    --to=peter.stephenson@csr.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).