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

Re: completing a comma-separated pair of values



On Fri, Mar 04, 2011 at 12:27:25AM +0100, Mikael Magnusson wrote:

> I'm about to go to bed and didn't read that carefully, but do you want
> _dir_list -s , maybe?

I'll have to approach that with a fresh brain, I think, but I'll take a
look.  It seems to me that it merely completes directories separated by a
separator character.  It doesn't help you if you want one of three
directories before the separator and either a particular directory or any
directory under another after the separator (and only one separator).  I'm
not completing directories, of course, but words, so it's not quite as
silly in real life as it sounds.  :)

I may have to roll my own with compadd and compset, but I was hoping to be
able to take advantage of _alternate for the second value, as it nicely
separates the two possibilities (fixed word vs path) with tags.  I'm sure
it's doable using the underlying bits, too, but I'm guessing this is going
to get complicated.

Thanks,
Danek



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