From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4568 invoked by alias); 20 Jan 2016 15:58:54 -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: 37708 Received: (qmail 23587 invoked from network); 20 Jan 2016 15:58:51 -0000 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,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=SbU81AvxAk5gdHiZXtzwf4yA4e6F2qNkIpDCPOCKaMA=; b=Y2Wr2Ym6QN7TGtwqgb656nG6xD7Mpri/xWO+5wDlvi/QHNZF8jcxtSZhyKBAGYq2d8 vDysdMVaWVBamh6cxHySi5HxYdADT0X/bkHKHtgmocpNlpRlUhu0UXaH6bGaUEnbAYAX fvu2rXaujETUWXwcX5YlA+bccHY7d5PoOaJRmeybqv0D+scXFpAFEFGtgvC70yDYd8qe RMELBK03hK6S3u74PyfP1ihWyuosGCLEK0FaZnkqJlLxjtyoUj7BjJ1aVqqpp/TQlQYX EwWJqET26HIkHQb/W6hLw/2S1iWw7QW0uRqn6DWGPhhVBZpglCbK6yj8yMFUuqOk4Jdz 1Acw== X-Gm-Message-State: ALoCoQmsTZ9g3a/Es1xaVKYWOrOhprRfG4WsKBjaSzPI2GFAA6/1V57X0j/pCFW+BTjQWQWnoD2utlpK+uCRpUbIwhHqxvnKkg== X-Received: by 10.66.90.133 with SMTP id bw5mr53217024pab.22.1453305529396; Wed, 20 Jan 2016 07:58:49 -0800 (PST) From: Bart Schaefer Message-Id: <160120075917.ZM20024@torch.brasslantern.com> Date: Wed, 20 Jan 2016 07:59:17 -0800 In-Reply-To: <20160120074753.GA13624@tarsus.local2> Comments: In reply to Daniel Shahaf "Re: bufferwords() lexes a subshell in a shortloop repeat as a string" (Jan 20, 7:47am) 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> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.