zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Vasiliy Ivanov <beelzebubbie.logs@gmail.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>, zsh-workers@zsh.org
Subject: Re: _history_complete_{newer,older} complains on "unmat ched" in _all_labels if globbing
Date: Wed, 22 Oct 2014 11:08:48 +0000	[thread overview]
Message-ID: <20141022110848.GC1692@tarsus.local2> (raw)
In-Reply-To: <54477091.8050102@gmail.com>

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


  reply	other threads:[~2014-10-22 11:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21 21:08 _history_complete_{newer,older} complains on «unmatched» " Vasiliy Ivanov
2014-10-22  6:43 ` _history_complete_{newer,older} complains on "unmat ched" " Bart Schaefer
2014-10-22  8:53   ` Vasiliy Ivanov
2014-10-22 11:08     ` Daniel Shahaf [this message]
2014-10-22 21:26       ` Vasiliy Ivanov
2014-10-23  3:18         ` Bart Schaefer
2014-10-24 20:47           ` Vasiliy Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141022110848.GC1692@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=beelzebubbie.logs@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).