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

Re: widget special PREFIX variable and cursor position with complete_in_word



On 02/13/2014 06:25 PM, Bart Schaefer wrote:
> } Yes, at this point I'm shown the completion list for the first
> } ambiguous position, and I need to know the string up to the cursor
> } location (not the entire argument), in order to match the ambiguous
> } character in the list.
> 
> You want $compstate[unambiguous] and $compstate[unambiguous_cursor],
> but you can't examine them until after the rest of completion is done
> with its work -- perhaps by poking something into the $comppostfuncs
> array (see the _all_matches completer for an example).

Indeed, I was already looking at $compstate[unambiguous], but it's not
yet set for my purposes.

Even after reading the _all_matches example, I'm not sure I follow you
about using comppostfuncs. It would still be called too late for my
purposes.




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