From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21377 invoked by alias); 24 Oct 2014 20:47:19 -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: 33527 Received: (qmail 18669 invoked from network); 24 Oct 2014 20:47:14 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6WNPOsupoL0KY9sT+Q1R+Gm/iUNt75fgHGIRkJ1aA80=; b=hEmLNZxTTlFsRfNZnTBotOYAz8qyx5pXj8diMkRFdAWjFFfqz4rzTLji85fQLa9BCg kmcGVjFuJ0C4VgGlN6DzSk9ORA5aMP7B2d8gFj/dYoKLEWepqfPtVO4nbnnbQr/Dv2IX jb6i3IBXg/BhmwDIbrRx9EVhc26M6JLUJF5IM0UXBimUub2Mt6PDk9wr61WFWtkC1P08 JFdM4ettXU5JXfRfFd8jzjan40asN2hhWCsURUJHyX86A/3DAgH1I2Gn966uT+mpcbUK CHY2xtiOYsyc2Gc0tZJ15uOtyQMLSewWEm3f0P1tZgPWnmYN9+DFAJcs86pVjuf9+gXO 173A== X-Received: by 10.112.156.138 with SMTP id we10mr5520421lbb.88.1414183624700; Fri, 24 Oct 2014 13:47:04 -0700 (PDT) Message-ID: <544ABAC5.9080707@gmail.com> Date: Sat, 25 Oct 2014 02:47:01 +0600 From: Vasiliy Ivanov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: Bart Schaefer CC: zsh-workers@zsh.org Subject: Re: _history_complete_{newer,older} complains on "unmat ched" in _all_labels if globbing References: <5446CB4F.7080808@gmail.com> <141021234353.ZM14828@torch.brasslantern.com> <54477091.8050102@gmail.com> <20141022110848.GC1692@tarsus.local2> <5448210E.6090600@gmail.com> <141022201837.ZM17848@torch.brasslantern.com> In-Reply-To: <141022201837.ZM17848@torch.brasslantern.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/23/14 09:18, Bart Schaefer wrote: > On Oct 23, 3:26am, Vasiliy Ivanov wrote: } Subject: Re: _history_complete_{newer,older} > complains on "unmat ched" in } } % a='1 2' } % ^D (seems history must be loaded from file to > cause error) > > As a workaround until the patch below makes it into release, it would probably silence this > "unmatched" (and possibly make your completions more pleasing) if you "setopt HIST_LEX_WORDS" > in your .zlogin file. See the description of that option for details. > > } $ zsh -f } % export HISTSIZE=9000 } ... } % compinit } % *olo<^[/> } _all_labels:39: > unmatched ' } _all_labels:39: unmatched ' > > OK, this really isn't directly related to history completion, it's a generic problem with > compadd invoking the parser without first telling it to be quiet. With HIST_LEX_WORDS the > string being parsed would already be a fully-quoted expression and the error would not occur in > history word completion (but might occur under other circumstances). > > > diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 4cd3b9f..05ae43a 100644 --- > a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -1014,6 +1014,7 @@ comp_match(char *pfx, > char *sfx, char *w, Patprog cp, Cline *clp, int qu, Brinfo *bpl, int bcp, Brinfo *bsl, int bcs, > int *exact) { char *r = NULL; + int onoerrs = noerrs; > > if (cp) { /* We have a globcomplete-like pattern, just use that. */ @@ -1033,12 +1034,14 @@ > comp_match(char *pfx, char *sfx, char *w, Patprog cp, Cline *clp, int qu, */ teststr = > dupstring(r); tokenize(teststr); + noerrs = 1; if (parse_subst_string(teststr)) teststr = > r; else { remnulargs(teststr); untokenize(teststr); } + noerrs = onoerrs; } else teststr = > r; if (!pattry(cp, teststr)) > Thanks for the patch and good advice for everyday use (HIST_LEX_WORDS). - -- Regards, Vasiliy Ivanov -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJUSrrFAAoJEAnDj7eK12hqOKsH/if5Qz6Km4aIdSrz98h4l2BK CPNP1uHgUvv4fVWXI3EDQlFFx9fodyb6aSij3sUTg5p0/KyEAp82WPKdAKZCEtBd 4ipJS128QMz4GPBJjkFSHOTffPdqz9ZhK9ganS6/YwRkMz1eQalfIriBpJTbzCcH f/pg5FoJScElxlmoksjnVOTNV1G8w8i2PKRvHHUX8npEL2OQLKOmQg7E92HdxvXF IVF/5gu3hpb3Z2FMIoNudN52fn9u2AH3lCES0+k9FWoDzNt0gXpLNlBWz5hKMrn9 vgnFP2qQocIkxhw0ISDxI1awlzi6s3ZI4fn7BR1YGn0KWyK4fW4lakOB7YjZmHg= =Oqc6 -----END PGP SIGNATURE-----