Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: crash when expand-or-complete widget wrapped
- X-seq: zsh-workers 26828
- From: Dylan Alex Simon <dylan@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: crash when expand-or-complete widget wrapped
- Date: Sat, 11 Apr 2009 00:31:52 -0400
- In-reply-to: <20090408044920.GA21100@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20090407035737.GA4200@xxxxxxxxxxxxxxxx> <20090408044920.GA21100@xxxxxxxxxxxxxxxx>
> > 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.
:-Dylan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author