From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 789 invoked by alias); 27 Feb 2014 00:31:14 -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: 32436 Received: (qmail 21484 invoked from network); 27 Feb 2014 00:31:07 -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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1393460739; bh=pKC5CoHViSGqhQwyb27t60Pu5RGQ9BFhsF27suBeL1I=; h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Received:cc:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=DZ1VTFgjUUI0WCz8bTPDd1qd1rlAkJMSAetwujAmRVeQUujkyvQj9sKJrZEDYDRqY6rmtDbVtTMkhMxOa3S6EgBZb+cYOkaZU44kGfc0VrJPX9GEfR4j1Ug4Nwta59iLT+XnKN+kwpNnQT6V+SQfEcqFoaudn/lwMyTa4ELFISk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; b=3secjHTnaBb7Wlq16WvRfEzQc0pcTdMx8HpXTh+fZ++x9fa/QoG2jFzQfdyeaOZCY3bvFqJMpHNMsBT0DsVNaNrdI8wbyku3MZkXsVRyaZBH8aIdpaOsAou2g1D30cdULYjWiJ7NY2p6YzwgfV9Uvb3qIam38XxuxAI9SLLJ1GA=; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1393460739; bh=pKC5CoHViSGqhQwyb27t60Pu5RGQ9BFhsF27suBeL1I=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Received:cc:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=WmuODZtMi++r0CM/fQrJueGfvK7nq8eVROSsnSrQgaqxBS5TiUgSL4Wp+nnj5S0VXt0hz5QETqxGi0AY3Q77ipMQKwTturnQ9YQFWwXErJ0HKzhmlb4JfGeg1C4Dqm5JY0Pkak62YGJfAq6SRWVLFghUa1ODA5caaarRgL90mNs= X-Yahoo-Newman-Id: 213667.63952.bm@smtp145.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Ud4vwjgVM1nLpsqv3nfDehpbInIot_QcUcOzNmzBTOI8bus EgzIFlskTXud0.sZKPDTbMQsFcceMGWyRkEI3P.dVoJXzGq_vYuI40X8Ns6a lVAM.3waM0R8g1KJ8wMmOAP6OnUCkMTmBRJS2fsRxjyuAT.Qgrq8R9XgUpCi Xc1n4zYi2ikHrzoAx1avUsJOx8OlCFfhTy57sAlUIkBLyn01mC3yw7Dxb9en UbwnN5G.yrjKKNMwJMlJLjWZ5ghFJuvxIyccZ7AsPAedDVNDHbvO56dELZ5_ lDVdLcN0GkSgJ_mXG7F6VAQC7Pn349IsBjUa8Xhw6gZG1nnUuq.XV3tiOR4v bZXllciSeBjTy0fVh2TGXFklkYMp3gNM.XBQOECgom1TJic7jvZ0Cjegb13r 9rnbMAoHNXa7ANT.V1hbRTiArMrpmsmg_htBQGBfLTFMP6G17tKkB2Gmhe4W UqN3mIf.Rdgk0VQLQcmQVOmBsgn.Lb8pBVjHcVlZRxVi.xUZDsBRbxV1llR6 YTHs5v2eAwvYNQXVCUJaMfFYKsGk- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- X-Rocket-Received: from kiddle.eu (okiddle@178.201.4.117 with plain [188.125.69.59]) by smtp145.mail.ir2.yahoo.com with SMTP; 27 Feb 2014 00:25:39 +0000 UTC cc: Zsh workers In-reply-to: From: Oliver Kiddle References: <140212214707.ZM25929@torch.brasslantern.com> <140213092531.ZM26966@torch.brasslantern.com> <140213223438.ZM27375@torch.brasslantern.com> <13128.1392379014@thecus.kiddle.eu> <13979.1392388765@thecus.kiddle.eu> <15748.1392413785@thecus.kiddle.eu> <12657.1392655814@thecus.kiddle.eu> <16810.1392737023@thecus.kiddle.eu> <19322.1392746842@thecus.kiddle.eu> <12895.1393360892@thecus.kiddle.eu> To: Yuri D'Elia Subject: Re: widget special PREFIX variable and cursor position with complete_in_word MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19705.1393455622.1@thecus.kiddle.eu> Date: Thu, 27 Feb 2014 00:00:22 +0100 Message-ID: <19706.1393455622@thecus.kiddle.eu> Yuri D'Elia wrote: > On 02/26/2014 09:15 AM, Yuri D'Elia wrote: > > I also noticed so far that it fails for = like you said, and # too. # works fine in my testing. As do < and > but it is probably wise to quote them anyway. > It occurred to me that maybe = is incorrectly used literally for tokenization inside complist. > Could somebody look if the string is tokenized correctly? You're right. The complist code is splitting on =. With the following patch, the = can be matched. This allows a \= or plain = if it is inside (...). Any thoughts on if that's right? Oliver diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index b852ee9..5e5ba9f 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -383,12 +383,25 @@ getcoldef(char *s) } else if (*s == '=') { char *p = ++s, *t, *cols[MAX_POS]; int ncols = 0; + int nesting = 0; Patprog prog; /* This is for a pattern. */ - while (*s && *s != '=') - s++; + while (*s && (nesting || *s != '=')) { + switch (*s++) { + case '\\': + if (*s) + s++; + break; + case '(': + nesting++; + break; + case ')': + nesting--; + break; + } + } if (!*s) return s; *s++ = '\0';