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

Re: crash when expand-or-complete widget wrapped

> > Is there some reason this is not an okay thing to do or that completion widgets
> > should be called differently?  (I'm working on improving predict-on.)
> You can't call completion widgets from non-completion widgets, in the
> general case.  In fact you generally can't call completion widgets
> with "zle widget_name", because completion widgets don't share the
> normal editor state.

> zle -C widget-wrapper expand-or-complete widget-wrapper

Sorry, I guess my question was a little confused (I shouldn't have said
"completion widgets").  As far as I understand, expand-or-complete and
complete-word are not themselves actual completion widgets (they aren't
generating completion lists) but rather zle widgets that invoke completion.

In fact, complete-word is invoked exactly as "zle complete-word" from
insert-and-predict in predict-on (which works fine).  The problem seems only
to happen when you invoke the dotted version "zle .expand-or-complete" rather
than "zle expand-and-complete".  That is, if I create a new widget to wrap
expand-and-complete that just does "zle expand-and-complete -- "$@"" and bind
tab to it instead, things work fine.


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