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

How to change description for _user_expand completions?



Many times the completion function I write works, but I've always got
the uneasy feeling that it works because of a certain amount of
coincidence instead of intent.

I feel like I only know just enough completion-system magic to be
dangerous, so I'd appreciate any guidance.  It would be handy if there
were a zsh completion/expansion system cookbook.  zshcompsys(1) and
zshcompwid(1) explain what's available, but I've found it difficult to
figure out the "correct" way to accomplish something and support all of
the other features (like configurable styles, etc.) for my functions.

My current problem:  I've got a function called by _user_expand so I can
generate context-independent completions based on a particular prefix.

It works perfectly well, but the only description that ever appears is
either "all expansions" or "expansions" (or "original").  I want to
specify the description string from within my expander function,
tailored to the results I'm returning, rather than have to accept the
default.

I thought I could call _describe, but I can't seem to find the correct
parameters to make it work.

Is this possible?  Or since there could be any number of expansion
functions called, do the results have to all be lumped into the same
group because there's no tag information specific to each expander?

-- 
Shawn



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