* Re: bindkey bug with zsh-3.1.6-dev-21?
@ 2000-04-19 8:57 Sven Wischnowsky
2000-04-19 9:14 ` Thomas Köhler
2000-04-19 9:19 ` Peter Stephenson
0 siblings, 2 replies; 7+ messages in thread
From: Sven Wischnowsky @ 2000-04-19 8:57 UTC (permalink / raw)
To: zsh-workers
=?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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey bug with zsh-3.1.6-dev-21?
2000-04-19 8:57 bindkey bug with zsh-3.1.6-dev-21? Sven Wischnowsky
@ 2000-04-19 9:14 ` Thomas Köhler
2000-04-19 9:19 ` Peter Stephenson
1 sibling, 0 replies; 7+ messages in thread
From: Thomas Köhler @ 2000-04-19 9:14 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 2263 bytes --]
On Wed, Apr 19, 2000 at 10:58:14AM +0200,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> 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@picard.franken.de | LCARS - Linux
<>< WWW: http://jeanluc-picard.de | for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey bug with zsh-3.1.6-dev-21?
2000-04-19 8:57 bindkey bug with zsh-3.1.6-dev-21? Sven Wischnowsky
2000-04-19 9:14 ` Thomas Köhler
@ 2000-04-19 9:19 ` Peter Stephenson
1 sibling, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2000-04-19 9:19 UTC (permalink / raw)
To: Zsh hackers list
> 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.
--
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey bug with zsh-3.1.6-dev-21?
@ 2000-04-19 9:45 Sven Wischnowsky
0 siblings, 0 replies; 7+ messages in thread
From: Sven Wischnowsky @ 2000-04-19 9:45 UTC (permalink / raw)
To: zsh-workers
Peter Stephenson wrote:
> > 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?
>
> Looks worth trying --- assuming (which I haven't checked) that something in
> compinit loads complete, this is about the best you can do.
`zle -C' load zsh/complete.
> The only other
> possibilitity I can see is to delay loading old completion until zle
> actually starts up --- then if there's no new completion, it's safe to
> assume old completion is required. That might be quite sensible if it's
> easy to implement.
Sounds good too...
I've no time to hack now...
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey bug with zsh-3.1.6-dev-21?
2000-04-19 9:26 Sven Wischnowsky
@ 2000-04-19 9:39 ` Peter Stephenson
0 siblings, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2000-04-19 9:39 UTC (permalink / raw)
To: Zsh hackers list
> 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?
Looks worth trying --- assuming (which I haven't checked) that something in
compinit loads complete, this is about the best you can do. The only other
possibilitity I can see is to delay loading old completion until zle
actually starts up --- then if there's no new completion, it's safe to
assume old completion is required. That might be quite sensible if it's
easy to implement.
--
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey bug with zsh-3.1.6-dev-21?
@ 2000-04-19 9:26 Sven Wischnowsky
2000-04-19 9:39 ` Peter Stephenson
0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 2000-04-19 9:26 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* bindkey bug with zsh-3.1.6-dev-21?
@ 2000-04-19 8:35 Thomas Köhler
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Köhler @ 2000-04-19 8:35 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
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=vi
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=vi" line in my
.zshrc and type "bindkey -e" on the prompt later, tab-completion works.
How to resolve the problem?
CU,
Thomas
--
Thomas Köhler Email: jean-luc@picard.franken.de | LCARS - Linux
<>< WWW: http://jeanluc-picard.de | for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2000-04-19 9:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-19 8:57 bindkey bug with zsh-3.1.6-dev-21? Sven Wischnowsky
2000-04-19 9:14 ` Thomas Köhler
2000-04-19 9:19 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
2000-04-19 9:45 Sven Wischnowsky
2000-04-19 9:26 Sven Wischnowsky
2000-04-19 9:39 ` Peter Stephenson
2000-04-19 8:35 Thomas Köhler
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).