zsh-users
 help / color / mirror / code / Atom feed
From: Nicholas Wiles <nhwiles@gmail.com>
To: zsh-users@zsh.org
Subject: Using _describe for completions.
Date: Thu, 12 Oct 2017 09:19:40 -0700	[thread overview]
Message-ID: <5CD230C2-0103-456B-A567-F63FE6CECFE1@gmail.com> (raw)

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

Hello fellow users, fist time poster. I apologize if this is not the right place. 

On zsh 5.2 I am trying to write a completion function using the _describe builtin.

__foo_complete_func() {
  list=(foo:'description for foo’ bar:'description for bar')
  _describe '’ list && _ret=0
}

compdef __foo_complete_func foo

When autocompleting just “foo ” I get the expected:

bar  -- description for bar
foo  -- description for foo

However when tab completing "foo b" I get no matches shown. I don’t understand why this is. I would expect to get the completion "foo bar”

Any ideas?

Thanks in advance,
Nic

             reply	other threads:[~2017-10-12 16:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 16:19 Nicholas Wiles [this message]
2017-10-12 17:42 ` Daniel Shahaf

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=5CD230C2-0103-456B-A567-F63FE6CECFE1@gmail.com \
    --to=nhwiles@gmail.com \
    --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).