From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26797 invoked by alias); 12 Oct 2014 17:36:04 -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: 33444 Received: (qmail 20961 invoked from network); 12 Oct 2014 17:35:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [80.3.229.105] X-Spam: 0 X-Authority: v=2.1 cv=RcseCjdv c=1 sm=1 tr=0 a=uz1KDxDNIq33yePw376BBA==:117 a=uz1KDxDNIq33yePw376BBA==:17 a=NLZqzBF-AAAA:8 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=BrDiTsk0AAAA:8 a=dRiX0t1w1PBvmQ6q5MsA:9 a=CjuIK1q_8ugA:10 a=-hJg1tCh9CgA:10 Date: Sun, 12 Oct 2014 18:35:47 +0100 From: Peter Stephenson To: Zsh workers Subject: Re: bug with completion in quotes Message-ID: <20141012183547.707f1818@pws-pc.ntlworld.com> In-Reply-To: <13524.1413067029@thecus.kiddle.eu> References: <13524.1413067029@thecus.kiddle.eu> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 12 Oct 2014 00:37:09 +0200 Oliver Kiddle wrote: > Compiled with --enable-zsh-debug, I get bugs listed when completing > inside $' style quotes whenever there's stuff after the cursor: > > appears at cursor position > > % : $'x > utils.c:5893: BUG: unterminated $' substitution > % : $'x' > zle_tricky.c:666: BUG: 0 <= wb <= zlemetacs <= we is not true! > > The line containing the first message was added in workers/22026 from > about 2006. This code is particularly horrible. 2006 is about the last time I remember looking at it and giving up. However, most of the really nasty problems we're with nested quotes e.g. where a quoted argument to a shell or scripting language itself contained quotes --- which I'm not sure we whould be trying to do internally anyway. One set of quotes is just about tractable. The chief suspect is set_comp_sep() --- it's very brittle because it's interacting with all sorts of different parts of the shell in ad hoc ways. pws