zsh-workers
 help / color / mirror / code / Atom feed
* completing a comma-separated pair of values
@ 2011-03-03 23:00 Danek Duvall
  2011-03-03 23:27 ` Mikael Magnusson
  0 siblings, 1 reply; 8+ messages in thread
From: Danek Duvall @ 2011-03-03 23:00 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-03-06 22:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-03 23:00 completing a comma-separated pair of values Danek Duvall
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

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).