From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19850 invoked by alias); 19 May 2015 08:44:51 -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: 35219 Received: (qmail 15864 invoked from network); 19 May 2015 08:44:48 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f794b6d000001495-e5-555af7fc6309 Date: Tue, 19 May 2015 09:44:29 +0100 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: vim completion problem after workers/35168 Message-id: <20150519094429.6880cf81@pwslap01u.europe.root.pri> In-reply-to: <20150519013457.GA2024@tarsus.local2> References: <20150518115301.0c80918d@pwslap01u.europe.root.pri> <20150518124039.0160a3bb@pwslap01u.europe.root.pri> <150518173034.ZM2314@torch.brasslantern.com> <20150519013457.GA2024@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+NgFjrILMWRmVeSWpSXmKPExsVy+t/xK7p/vkeFGjx5r25xsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mhqm/2IvmM5b8WF+QAPjDq4uRg4OCQETiXnHLLoYOYFMMYkL 99azdTFycQgJLGWU2LrwBDOEM4NJYun1eywQzjZGiUVXWlhAulkEVCWa3umDdLMJGEpM3TSb ESQsIqAt0f5RDCQsLGAusfLsLBYQm1fAXuJBw2M2EJtTwEhi3ZcHUCPvMEnsuLuJFSTBL6Av cfXvJyaIi+wlZl45wwjRLCjxY/I9sEHMAloSm7c1sULY8hKb17xlBrGFBNQlbtzdzT6BUWgW kpZZSFpmIWlZwMi8ilE0tTS5oDgpPddIrzgxt7g0L10vOT93EyMkYL/uYFx6zOoQowAHoxIP 7wq/yFAh1sSy4srcQ4wSHMxKIrySn6NChXhTEiurUovy44tKc1KLDzFKc7AoifPO3PU+REgg PbEkNTs1tSC1CCbLxMEp1cA45VZavqhU+zsT7lcCqt8UtwYYZWpWrJ9en3Y8L2J23OsVmy3e HGmqb9hfOo1Jr9DoXnywPtNhqR31d7Xf/PzAmi/wg0Gjo+tM87Uft3devvjHmzPssXeHdtD2 vdKyn05wOOxekLnoyIwshd61tV+lXBmaD67u375t390H6+bwv2iKFOlQ9N6jxFKckWioxVxU nAgABgXeMlQCAAA= Bart Schaefer wrote on Mon, May 18, 2015 at 17:30:34 -0700: > Hrm. Zsh patterns include "(this|that)", and "case" syntax includes > "pattern)" without an open paren, so ...? The problem is that the initial "(" now has to introduce a set of words (with whitespace that's optional in most but not all cases) rather than a single zsh pattern. If you find an extraneous ")" at the end it's too late to decide you should have been parsing a single pattern rather than a set of alternative patterns. We got away with this before by hacking the pattern ex post facto in one case but not the other. We could in principle read it as before and re-parse it, but that's creating a bug-prone mess to fix a case I doubt happens very often (the _vim code was clearly intended to have balanced parentheses all along). > The "old hack" is one of those "well, it really should have been done > differently in the first place, but it wasn't, so now what?" issues > that bug me because *somebody* is going to get bitten in the way _vim > just was. Yes, we're in rather a corner over this. But I'm still hoping the nasty cases can be kept to a minimum. On Tue, 19 May 2015 01:34:57 +0000 Daniel Shahaf wrote: > Is there any case in which the neither pre-35168 code nor post-35168 > code gives a parse error, but the semantics are different? To the best of my knowledge the new code is stricter. When I get a moment to look, any laxness I introduce should be exactly on the lines of what happened before --- I don't think there's any ambiguity because after a string either you get a "|" (standard) or another string (zsh special). pws