Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bufferwords() lexes a subshell in a shortloop repeat as a string
- X-seq: zsh-workers 37708
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
- Date: Wed, 20 Jan 2016 07:59:17 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=SbU81AvxAk5gdHiZXtzwf4yA4e6F2qNkIpDCPOCKaMA=; b=o2jV4jnuSJOhpoA2DJx8MhR9d1VeK9U97Y7UHhS2NPL0dZ2C9Tp09RDdankpldr/Bz fmlA5bGukdJ3knfR6fsILwfVO/flzrcRMIhFIMHoOObCaXBRs7fBr6YtyxY72396YYh+ 6tKriOZaFcNc0UOAULGPwxSx7gMAST3zEacH+Okt5sbbK3X2XWTacY7c7b2m5s/nb7ey fMa+h5f0/o0hCyPdZuGIFT91ZsJW7HcE1wRW9+ZawOtc6lGFao/ykVDknrxe8O7ClcqR 5wGfNgXOGuF3PdDTzVA/CqMXjRX56vybgLTtbJIP9mlVL/kYPbYMRYx9M/+uBiLbE5xn rjxg==
- In-reply-to: <20160120074753.GA13624@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160115062648.GA14019@tarsus.local2> <20160115094117.5fcde75c@pwslap01u.europe.root.pri> <20160118022558.GC3979@tarsus.local2> <20160118104548.7db26f60@pwslap01u.europe.root.pri> <20160120074753.GA13624@tarsus.local2>
On Jan 20, 7:47am, Daniel Shahaf wrote:
}
} bufferwords() received the "(x)" as a STRING token, so I looked further
} down, into gettok(). The attached patch seems to do the trick [see the
} added tests]. However, to paraphrase Knuth, I only tested this code,
} not proved it correct. I'd appreciate a review.
I haven't tried compiling with the patch, but of course the interesting
test case is something like
repeat $( : complicated thing ending with; print $number ) (echo foo)
I.e. syntax is not "repeat TOKEN command" it's "repeat WORD command"
Also what's the reason for the trailing underscore on "inrepeat_"? That
isn't done anywhere else in the source.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author