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

Re: autoload



On 09/18/2015 05:14 PM, Bart Schaefer wrote:
I decided I should clarify something:

...
I don't want to claim there is anything wrong with Debian's choice, I
merly point it out as a probably-unintended side effect.

If I understand, you are saying that a .zwc can't be in the same dir as the files from which it was created? Even though that is where it will be created? I dunno, autoload/zcompile seems like such a good idea but the implementation seems deliberately obscure. As I read the doc, it looked for the most recent file in whatever dir. We have every possible twist and turn, what we don't have is a simple and direct way of precompiling functions:

autoload --functions-out /All-My-Functions/All-My-Functions.zwc

... precompiled, *and/but* only loaded when called. Exactly like sourcing, only faster and better.

Could even make making 'em look like this, just to be symetrical:

autoload --functions-in /All-My-Functions/All-My-Functions.zwc /All-My-Functions/*

.... scripts, functions, however many per file, whatever the name ... no matter, it's all wrapped up in the .zwc ready to go, just remembering that functions from scripts will be 'auto-named' after the containing file. Too cute? Na ... it's easy to understand
and rather elegant.  The whole thing could be explained in two minutes
and implemented in 30 seconds.  Why do things *have* to be difficult?

As for me, I took Sebastian's stuff and converted it all to plain vanilla good old fashioned righteous Protestant functions and may I never have to think about $fpath again ;-) Seriously, I'll just let my brain cool down for a while and try to learn something
that a mortal can learn.  Sheesh, even Bart forgets how it works ...



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