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

Re: How to capture a list of completions from a zle widget



On Oct 27,  4:16pm, Thiago Padilha wrote:
}
} How can I capture a list of possible completions for the current values
} of $LBUFFER $RBUFFER and $CURSOR in a zle widget?

You need to override the "compadd" builtin.  Have a look at the example
_expand_word_and_keep function in Functions/Zle/keeper.


Which, I've just noticed, unnecessarily uses both the "function" keyword
and the "name()" syntax; only one or the other is necessary.  Also the
"always" block in _expand_word_and_keep really should cover the entire
definition of the compadd function.  So many nits to be picked ...



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