From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7384 invoked by alias); 12 Oct 2014 04:41: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: 33441 Received: (qmail 5370 invoked from network); 12 Oct 2014 04:41:48 -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 From: Bart Schaefer Message-id: <141011214153.ZM29456@torch.brasslantern.com> Date: Sat, 11 Oct 2014 21:41:53 -0700 In-reply-to: <13524.1413067029@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "bug with completion in quotes" (Oct 12, 12:37am) References: <13524.1413067029@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh workers Subject: Re: bug with completion in quotes MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 12, 12:37am, Oliver Kiddle wrote: } Subject: bug with completion in quotes } } % : $'x } utils.c:5893: BUG: unterminated $' substitution Hrm. Comments say: * ... If both GETKEY_DOLLAR_QUOTE * and GETKEY_UPDATE_OFFSET are present in "how", the string is not * expected to be terminated (this is used in completion to parse * a partial $'...'-quoted string) and the length passed back is * that of the converted string. And later, right at the point of that DPUTS: * When called from completion, where we use GETKEY_UPDATE_OFFSET to * update the index into the metafied editor line, we don't necessarily * have the end of a $'...' quotation, else we should do. However, as far as I can tell nothing ever passes GETKEY_UPDATE_OFFSET in any circumstances, completion or otherwise. Adding that flag to the call near zle_tricky.c:1733 silences this warning, but that can't be correct as GETKEY_UPDATE_OFFSET expects to deref the "misc" parameter which is NULL in that call. There are also places in utils.c where comments appear to mean that GETKEY_UPDATE_OFFSET tests need to be added, but there are none. I think we've uncovered someone's unfinshed work. } % : $'x' } zle_tricky.c:666: BUG: 0 <= wb <= zlemetacs <= we is not true! Examining in the debugger we have (gdb) p wb $2 = 2 (gdb) p zlemetacs $3 = 1 (gdb) p we $4 = 3 I think this is an off-by-one error happening because dollar-tick is two characters being treated as a solitary quote, but I don't know where to fix it.