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

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



=?iso-8859-1?Q?Thomas_K=F6hler?= wrote:

> Hi,
> Seems that there's a problem with bindkey and zsh-3.1.6-dev-21 and
> zsh-3.1.6-dev-22:
> 
> When I use this .zshrc:
> 
>   bindkey -e
>   export EDITOR=3Dvi
> 
> I get not tab-completion. If I type "bindkey", I get a long list of
> bindkeys, amongst others this one:
> "^I" expand-or-complete
> 
> So, the binding is there, but it just doesn't work :-(
> 
> The funny thing is, when I just have the "export EDITOR=3Dvi" line in my
> =2Ezshrc and type "bindkey -e" on the prompt later, tab-completion works.
> How to resolve the problem?

Put `zmodload zsh/compctl' in your `.zshrc'. Or better, use the new
completion system (autoloading and calling `compinit').


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).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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