From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18685 invoked by alias); 18 Jan 2016 10:45:57 -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: 37671 Received: (qmail 6745 invoked from network); 18 Jan 2016 10:45:54 -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 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f79b16d000005389-67-569cc25e95b9 Date: Mon, 18 Jan 2016 10:45:48 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string Message-id: <20160118104548.7db26f60@pwslap01u.europe.root.pri> In-reply-to: <20160118022558.GC3979@tarsus.local2> References: <20160115062648.GA14019@tarsus.local2> <20160115094117.5fcde75c@pwslap01u.europe.root.pri> <20160118022558.GC3979@tarsus.local2> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xa7rxh+aEGXTuYrQ42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGV/X3WcseMNRcWbfT+YGxlb2LkZODgkBE4n3vRuYIWwxiQv3 1rN1MXJxCAksZZS4sXMnO4Qzg0niytkFjBDOOUaJa6fOMoG0CAmcZZRobZYCsVkEVCX6pr1k A7HZBAwlpm6azQhiiwiIS5xde54FxBYW8JWY1H8caCoHB6+AvcTRA84gYU4BI4n+//uYIOZP YJQ4dPcrK0iCX0Bf4urfT0wQ59lLzLxyBmwmr4CgxI/J98BmMgtoSWze1sQKYctLbF7zlhni NnWJG3d3s09gFJ6FpGUWkpZZSFoWMDKvYhRNLU0uKE5KzzXSK07MLS7NS9dLzs/dxAgJ5687 GJceszrEKMDBqMTD63B2dpgQa2JZcWXuIUYJDmYlEd7g9XPChHhTEiurUovy44tKc1KLDzFK c7AoifPO3PU+REggPbEkNTs1tSC1CCbLxMEp1cB4Y013348jpziW/lz4Nzr2dKYi6ytr7amX tt1QdV6gzzMjpWRqBuPWeR/r3Az6/MO9Vm06e8Ywgi9MtbjimopFuLHR/przRybJmzIelD3H 6F3Bu6NY7oUG49oFq7dzBzr905XQeLa+67JPi4elUfXv7QIObWlXWC7z6rn6iByZftJs2RqZ gC9KLMUZiYZazEXFiQCCmaJ5YwIAAA== On Mon, 18 Jan 2016 02:25:58 +0000 Daniel Shahaf wrote: > Even after reading your other reply, I still don't understand what > distinction you're trying to draw here, what case you say isn't expected > to work. Could you clarify, please? No, the whole point is I *can't* say what case isn't going to work, just that there will be a vast heap of them if you attempt to split arbitrary strings and prod the result in enough detail.. The underlying splitting is executing the raw lexer with various squiggles on top to fix up some special cases (but only some). It's doing it in a way which is sort-of helpful to completion, but it's doing it thoroughly inconsistently, given that in the case of (z) all it's been told is "here, have this string which has got some bits of command line in". So you just have to see what actually works and work round it. (Or, of course, rewrite the whole thing, which would be nice, but I don't think is ever going to happen.) There is some special casing in bufferwords() for loops, though, so maybe the case you want isn't far off working. pws