zsh-users
 help / color / mirror / code / Atom feed
From: Nicholas Wiles <nhwiles@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-users@zsh.org
Subject: Re: Question about matching completions with descriptions
Date: Sat, 9 Jun 2018 18:14:56 -0700	[thread overview]
Message-ID: <CAF4qJWVdnKS6__6hJHRZju73yDTeTRncpubOc-pcebmFZPMvsQ@mail.gmail.com> (raw)
In-Reply-To: <1528483095.1959306.1401324560.4120FDF5@webmail.messagingengine.com>

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

It looks like I need to match on the description prior to calling
_describe. Using -U and -V together achieved what I was trying to do. The
kicker was also adding compstate[insert]="automenu" to prevent common
prefix insertion which when you are matching within descriptions the common
prefix could be empty!
Thanks!


On Fri, Jun 8, 2018 at 11:38 AM Daniel Shahaf <d.s@daniel.shahaf.name>
wrote:

> Nicholas Wiles wrote on Fri, 08 Jun 2018 11:13 -0700:
> > I have a question about the _describe builtin.
> > I am building a binary that provides dynamic completions using a
> completion
> > function.
> >
> > Is to possible to provide completions to _describe that will be matched
> not
> > only on the text of the completion but also on words/text in the
> > description?
>
> I asked this once and the answer was that that wasn't possible.  I'd
> have linked you to the thread but I looked for it and can't find it :(
>
> > Or, is it possible to turn off completion matching entirely
> > and have zsh present the user with a verbatim set of completions provided
> > to compadd or _describe? Thanks in advance!
>
> Does passing -U (and possibly -V) to compadd do what you need?
>

      reply	other threads:[~2018-06-10  1:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 18:13 Nicholas Wiles
2018-06-08 18:38 ` Daniel Shahaf
2018-06-10  1:14   ` Nicholas Wiles [this message]

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=CAF4qJWVdnKS6__6hJHRZju73yDTeTRncpubOc-pcebmFZPMvsQ@mail.gmail.com \
    --to=nhwiles@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-users@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).