On Wed, Apr 19, 2000 at 10:58:14AM +0200, Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > > =?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'). Well, *I* do use the new completion system, but the one who found the problem (tries zsh because I showed him what it can do) doesn't (yet?). > 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. Uhm. Bad. > Can anyone think of a solution for this? I can't (apart from trying to > load compctl unconditionally, which I don't like). Is there a test whether or not a module is loaded? Something like if (load_module("zsh/zle") || is_loaded_module("zsh/zle")) load_module("zsh/compctl"); If there is no such function (I don't have any insight in zsh's source) perhaps now is the time to implement one :-) Other possible solution: load zsh/compctl if there's a bindkey in .z* - but that's of course not very intuitive. > Bye > Sven CU, Thomas -- Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx | LCARS - Linux <>< WWW: http://jeanluc-picard.de | for Computers IRC: jeanluc | on All Real PGP public key available from Homepage! | Starships
Attachment:
pgpFWRnoTNpbl.pgp
Description: PGP signature