Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Compsys and KSH_AUTOLOAD
- X-seq: zsh-workers 19759
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Compsys and KSH_AUTOLOAD
- Date: Mon, 12 Apr 2004 08:59:42 -0700
- In-reply-to: <1170.1081778412@athlon>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1040410174430.ZM10891@xxxxxxxxxxxxxxxxxxxxxxx> <1170.1081778412@athlon>
On Apr 12, 4:00pm, Oliver Kiddle wrote:
>
> Bart wrote:
> > tried the "zcompile -z" stuff (actually the zrecompile loop) suggested
> > in the manual, but it didn't work for him (I haven't investigated that
>
> It is only for compinit itself that I can get problems with that to
> occur. It seems to be a little sensitive about the contents of $fpath
Matthias has since written back to me again and says he's having all sorts
of problems with zcompile'd functions even after starting from scratch and
with ksh_autoload turned off. So the issue of documenting the "correct"
way to use compsys with kshautoload is separate.
> > autoload +X -z compinit _main_complete _complete_help _complete_debug \
> > _expand_alias _bash_completions _history_complete_word _next_tags
>
> > (1) Does this deserve a FAQ entry, or perhaps even a change to the
> > compsys documentation? I guess ksh_autoload isn't a very "frequently"
>
> It'd be better if we can get it to just work.
I don't specifically mean "does the above workaround deserve a FAQ entry"
but rather "does using compsys with kshautoload deserve a FAQ entry",
whatever the best A to the Q turns out to be.
> Is there any reason why the -z and -k options to autoload can only be
> used with +X
The autoload method used isn't stored anywhere in the function structure.
Only the fact that the function is not yet defined is stored, and then zsh
applies whatever autoload setting is in effect globally at the time that
the function is loaded.
I suppose we could modify the storage and the code that does autoloading
[as opposed to modifying only bin_autoload()]; I forget why I didn't do
so at the time -- probably because it was a significantly larger change.
> It would seem to me that the best would be if compinit could use
> `autoload -U -z' with functions being setup to look like this:
>
> _autoload () {
> # undefined
> builtin autoload -XUz
> }
Please note that undefined functions don't actually have any function body
at all. The "functions" command creates a dummy body when it outputs a
function that has no definition. So it's not just a matter of changing
the dummy body.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author