From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2544 invoked by alias); 20 Feb 2012 17:10:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30241 Received: (qmail 24387 invoked from network); 20 Feb 2012 17:09:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120220090953.ZM32622@torch.brasslantern.com> Date: Mon, 20 Feb 2012 09:09:53 -0800 In-reply-to: <20120220105901.51cbbd22@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Bug with bash emulation regarding ':'" (Feb 20, 10:59am) References: <20120129183644.6d49d237@pws-pc.ntlworld.com> <120131202909.ZM6076@torch.brasslantern.com> <120201082929.ZM7032@torch.brasslantern.com> <20120205201133.3bcd2b7f@pws-pc.ntlworld.com> <20120214174154.36268595@pwslap01u.europe.root.pri> <4F3AEE8D.9050705@case.edu> <20120215123641.01e5a4fd@pwslap01u.europe.root.pri> <120219154515.ZM7225@torch.brasslantern.com> <20120220105901.51cbbd22@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Subject: Re: Bug with bash emulation regarding ':' MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 20, 10:59am, Peter Stephenson wrote: } Subject: Re: Bug with bash emulation regarding ':' } } On Sun, 19 Feb 2012 15:45:15 -0800 } Bart Schaefer wrote: } > 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. [...] } } > + spbreak ? PREFORK_SINGLE : PREFORK_NOSHWORDSPLIT, Hrm. That may imply that we should do spbreak ? (PREFORK_SINGLE|PREFORK_SHWORDPSLIT) : PREFORK_NOSHWORDSPLIT As you later pointed out, this would only affects some strange cases like ${(@)=...=...}, because SINGLE beats SHWORDSPLIT at line 1540; in those cases the workaround must previously always have been to use additional nested expansions to turn the flags on in the right places. So I think we're safe with just SINGLE there. } 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 Well, it's because we've overloaded its meaning from the original one of "split words on IFS" to instead mean "split words on IFS in exactly the same circumstances and manner the POSIX shell would do so." Plus keeping the non-POSIXy behavior of the traditional shell when it's not set, which is the real divergence. } It might be worth folding this in and making 4.3.17 immediately, there's } no real point in releasing only a partial fix. I'll commit shortly if you haven't already.