Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.0
X-Originating-IP: [82.20.18.64]
X-Spam: 0
X-Authority: v=2.1 cv=MJad45tl c=1 sm=1 tr=0 a=tQ56d2wE10i0ATcm3CvKvA==:117
 a=tQ56d2wE10i0ATcm3CvKvA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10
 a=s5jvgZ67dGcA:10 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8
 a=LhPh6MCOgsGzKd49rMEA:9 a=CjuIK1q_8ugA:10
Date: Sun, 17 Jan 2016 18:16:47 +0000
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a
 string
Message-ID: <20160117181647.49899357@ntlworld.com>
In-Reply-To: <160115112516.ZM21347@torch.brasslantern.com>
References: <20160115062648.GA14019@tarsus.local2>
	<20160115094117.5fcde75c@pwslap01u.europe.root.pri>
	<160115112516.ZM21347@torch.brasslantern.com>
X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Seq: zsh-workers 37657

On Fri, 15 Jan 2016 11:25:16 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Jan 15,  9:41am, Peter Stephenson wrote:
> } Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a str
> }
> } it's just splitting words, and (... ...) indeed works as a complete word
> 
> Urk.  That probably ought to be disabled, at least in shell emulation,
> e.g. here is bash:

shwordsplit does this.  (I thought it would be shglob, but it isn't.)

By the way, I was too glib before: if you have a string that *starts*
with "(", it *does* get split as a complete command line that starts
with a subshell, even in native mode, as you might expect.  So I think
(z) is behaving basically rationally, but with the caveat I mentioned
that it's a fairly brutal tool in comparison with real context
sensitivity.

pws

