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

Re: Changing subword-range according to current completion context

On Nov 3,  3:57pm, Yuri D'Elia wrote:
} Isn't the state of each word, once expanded, saved somewhere?

Not really, unless the completion function is designed to do so.  The
only things that persist from any call of completion to the next are
which completion widget was used and what comprises the previous list
of possible maches, and all that is lost if any other kind of edit or
motion intervenes between calls to completion.

} By reading the manual, I'm not completely sure about the relationship
} between match-words-by-style and match-word-context.

Those are entirely separate widgets and have no relation to completion
(aside from everything being ZLE widgets, of course).  They merely make
an identification of the start and end of the word under or adjacent
to the cursor by using simple syntax rules; they know nothing otherwise
of command context or of how the word was added to the editor buffer.

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