zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Issue with insert-sections style
Date: Thu, 09 Sep 2010 09:34:54 -0700	[thread overview]
Message-ID: <100909093454.ZM16588@torch.brasslantern.com> (raw)
In-Reply-To: <20100909145014.GL2506@plenz.com>

On Sep 9,  4:50pm, Julius Plenz wrote:
}
} If you use the _oldlist completer together with the no_list_ambiguous
} option the following bug occurs: When you have entered a man page name
} with a prefix that can only be expanded to man pages from one section,
} that section number gets inserted when drawing the listing, and then
} *again* when the user enters menu completion.

The trouble here is that the section number *and a trailing space* are
passed to compadd as a prefix of the manual page name to be completed.
On the subsequent TAB, that trailing space causes the section number
on the line to be treated as a different word, and therefore it is not
matched against the entries in the previously-generated completion list
when it is re-used by _oldlist.

This is a generic limitation of completion: it does not operates across
$IFS-delimited boundaries, so any ambiguous match that includes an un-
quoted $IFS character can produce confusion when completion is repeated
on one of the substrings of the match.

It might be possible to partly fix this in _oldlist by, e.g., testing
for ${#${(z)_lastcomp[unambiguous]}} > 1 and discarding the old list in
that case.  (Can't use that test directly because if ${(z)...} yeilds
only one word, ${#...} counts the number of characters, but you get the
idea.)


  reply	other threads:[~2010-09-09 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 14:50 Julius Plenz
2010-09-09 16:34 ` Bart Schaefer [this message]
2010-09-09 18:04 ` Greg Klanderman
2010-09-09 19:00   ` Peter Stephenson
2010-09-10 13:50     ` Greg Klanderman

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=100909093454.ZM16588@torch.brasslantern.com \
    --to=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).