Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

completing a comma-separated pair of values



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



Messages sorted by: Reverse Date, Date, Thread, Author