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

Re: Completion widgets, bindkey and ZLE widgets



Andrej Borsenkow wrote:

> A step further is to unify normal widgets (zle -N) and completion (zle -C).
> Consider:
> 
> widgets are always called using standard interface described in ZLE (with
> all parameters likes BUFFER, NUMERIC etc set).
> 
> if this is a completion widget, additional parameters (and arguments) are
> setup.

It's actually a bit more than this that has to be done to start a
completion widget -- the completion code has to do quite a bit of
initialisation before the shell function can be called.

> We still need to designate widget as completion widget in this case, so
> zle -N won't work - but -C can then be reduced to simple 'zle -C expand-word
> function'. That will redefine complete-word and mark new widget as
> completion widget.

What if you want more than one completion widget behaving like one of
the builtin widgets? (Just think of the special key completion widgets 
we already have.)

> Looks somewhat cleaner ... and, later, if we find the way to make ZLE
> widgets more useful, that will be automatically available to completion
> widgets as well.

What are you thinking about here?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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