From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11548 invoked by alias); 1 Feb 2012 16:30:10 -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: 30178 Received: (qmail 3271 invoked from network); 1 Feb 2012 16:29:59 -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: <120201082929.ZM7032@torch.brasslantern.com> Date: Wed, 01 Feb 2012 08:29:29 -0800 In-reply-to: <120131202909.ZM6076@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Bug with bash emulation regarding ':'" (Jan 31, 8:29pm) References: <20120129183644.6d49d237@pws-pc.ntlworld.com> <120131202909.ZM6076@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Bug with bash emulation regarding ':' MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 31, 8:29pm, Bart Schaefer wrote: } } 2657 opts[SHWORDSPLIT] = 0; } 2658 multsub(&val, 0, NULL, &isarr, NULL); } } The problem is that we want to suppress any further splitting in the } current shell, but when we enter the subshell for $(...) it should } revert to the original setting. I can verify this by defining _test with "emulate sh -c ..." so that the SHWORDSPLIT option becomes sticky in that function. I'm still not sure what to do about it. The question goes a bit deeper in that there are several ways that shell code might get invoked during stringsubst() -- the (e::) glob flag, dynamic directory names, etc. -- and presumably those should also all use the original splitting style, whereas simple nested expansions should not.