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

Re: bindkey bug with zsh-3.1.6-dev-21?



Peter Stephenson wrote:

> > Ick. The problem is that in autoload_zleread() we do:
> > 
> >     if (load_module("zsh/zle"))
> > 	load_module("zsh/compctl");
> > 
> > i.e., we attempt to load compctl only if loading zle succeeds. For
> > people who have a call to `bindkey' in their .z*, the zle module will
> > already be loaded, re-loading fails and compctl is not loaded. Bummer.
> > 
> > Can anyone think of a solution for this? I can't (apart from trying to 
> > load compctl unconditionally, which I don't like).
> 
> Couldn't we also check whether ((trashzleptr == noop_function))?  If it is,
> zle isn't loaded, and if it isn't, zle must be loaded or something very
> weird has happened.  zlereadptr is even declared in both branches of the
> #ifdef just above.

Right, but what I would like to avoid is to load compctl whenever zle
is loaded. Otherwise anyone using the new completion system (which
loads zle indirectly) will have ol' compctl hanging around. And
_default will then try compctl's etc.

Hm, maybe a test of the form

  if (load(zle) || !loaded(complete)) load(compctl);

There's find_module() for that kind of test.

Does that sound sensible?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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