From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16543 invoked by alias); 22 Oct 2014 11:08:53 -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: 33499 Received: (qmail 931 invoked from network); 22 Oct 2014 11:08:52 -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,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=x-sasl-enc:date:from:to:cc:subject :message-id:references:mime-version:content-type :content-transfer-encoding:in-reply-to; s=mesmtp; bh=i5jE1cl3M5w DH1X2lOaR/qwi1yk=; b=mi2Zexfzphn+f9dYhOucyPpjksiZfHsbpCS3659+nwW WPu+xzuRN8uwLPyxCVsYbaRhHwUz5lac2yp0dzGBVPPJkEu5dYIYEsdZ6lTD8Yyj zHju0Jhrm/Xmrw2eylf4+r4/zjPTquuitlQwdxoY2wYi/cN+VZuAGVQxB1/aNqZI = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:date:from:to:cc:subject :message-id:references:mime-version:content-type :content-transfer-encoding:in-reply-to; s=smtpout; bh=i5jE1cl3M5 wDH1X2lOaR/qwi1yk=; b=kJnrVbef4eTPKi5kQ0x61at+AAh7GfZCbcgYzf2UWl 5FBTUS/ClkFCEPy5avohWsDnqFxWyEBuMJ6uuv4qc9M0vbwwziJndeDyica0OuW4 RhWMXGyNBzsd0FBFoZdOngl+u5cxkkTcrQcLQIOH24s4E0b5akgfcaWViZ7pzdZZ I= X-Sasl-enc: D0EAUO9ntWhu7X3re7dkIkidpV1QOfF3gtF7DWFXEcUz 1413976130 Date: Wed, 22 Oct 2014 11:08:48 +0000 From: Daniel Shahaf To: Vasiliy Ivanov Cc: Bart Schaefer , zsh-workers@zsh.org Subject: Re: _history_complete_{newer,older} complains on "unmat ched" in _all_labels if globbing Message-ID: <20141022110848.GC1692@tarsus.local2> References: <5446CB4F.7080808@gmail.com> <141021234353.ZM14828@torch.brasslantern.com> <54477091.8050102@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54477091.8050102@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Vasiliy Ivanov wrote on Wed, Oct 22, 2014 at 14:53:37 +0600: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 10/22/14 12:43, Bart Schaefer wrote: > > On Oct 22, 3:08am, Vasiliy Ivanov wrote: } } % typeset -a somevariable } % somevariable=(1 2 > > 3) } } % *mevar<_history-complete-older> (completed properly, 2 items suggested - > > 'somevariable=(' and } 'somevariable', guessed because expand prefix suffix style) } } but > > fires hundreds of messages: } _all_labels:39: closing brace expected } ... } _all_labels:39: > > unmatched ' } ... } _all_labels:39: unmatched " } } reproducible with any globbing syntax, zsh > > 5.0.7 > > > > There's something else about your configuration that you're not telling us, because I can't get > > any completions at all for *mevar unless I "setopt globcomplete", and I don't get any error > > messages even with that set. > > > > Line 39 of _all_labels is > > > > "${(@)argv[4,__pre]}" "${(P@)2}" "${(@)argv[__suf,-1]}" && __ret=0 > > > > which ends up substituting into something like > > > > +_all_labels:39> compadd -1 -V -default- -X '%SCompleting %Uhistory word%u%s' -Q -a > > 'historywords[beg,beg+slice]' +_all_labels:39> __ret=0 > > > > (though in your case the assignment to __ret is likely not happening) > > > > I was able to reproduce with zsh -f and minimal configuration: > > % setopt globcomplete > % autoload -U compinit > % compinit > > but *only* with my existing (2300+ records) history file; starting with empty one doesn't throw > these messages. > Line 39 in my case is «compadd -1 -V -default- -Q -a historywords[beg,beg+slice]» > > How can I debug this further (which history records leads to «unmatched» messages)? > Any hints will be extremely helpful. Have you tried a binary search? That is: split the history file to two roughly equal parts and try each one of them to see if it reproduces the error. It is likely that exactly one of the two halves will reproduce the error. Repeat the bifurcation process recursively within that half until you narrow the problem to a single history entry. Cheers, Daniel