zsh-workers
 help / color / mirror / code / Atom feed
From: Danek Duvall <duvall@comfychair.org>
To: zsh-workers@zsh.org
Subject: completing a comma-separated pair of values
Date: Thu, 3 Mar 2011 15:00:47 -0800	[thread overview]
Message-ID: <20110303230047.GA12871@lorien.comfychair.org> (raw)

I'm not sure if this is something I can do with the stock completion
widgets, and I can't think of any examples of this off the top of my head,
but what I need to be able to do is to complete a comma-separated pair of
values, where the order is important, and one side needs more complicated
completion (takes a path).  That is:

    property=value1,value2

I can almost get this with _values, but it requires the values to be in the
form <key>[<kvsep><value>], rather than <value>, and I can't simply make
the values keys.

Am I making any sense?  Do I have to write a copy of _values to do this?

Also, is there any way to make the "=" separator _values uses elide with
the "=" you type to finish (menu) completing?  For instance, if I have
properties prop1, prop2, and prop3, and I type:

    prop<TAB>

I get

    prop1=

and I can cycle through the three by hitting tab, but if I want to start
completing on the value of propN, I have to type something and the
backspace over it, rather than just hitting "=", like I would hit "/" if I
were completing through the directory heirarchy.

Thanks,
Danek


             reply	other threads:[~2011-03-03 23:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 23:00 Danek Duvall [this message]
2011-03-03 23:27 ` Mikael Magnusson
2011-03-03 23:58   ` Danek Duvall
2011-03-05  1:00     ` Danek Duvall
2011-03-05  9:20       ` Štěpán Němec
2011-03-05 14:15         ` Danek Duvall
2011-03-06 22:28           ` Oliver Kiddle
2011-03-06 22:59             ` Danek Duvall

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=20110303230047.GA12871@lorien.comfychair.org \
    --to=duvall@comfychair.org \
    --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).