From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25527 invoked by alias); 19 Sep 2015 15:04:41 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20597 Received: (qmail 15554 invoked from network); 19 Sep 2015 15:04:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=Qosx6O6xXGET3N4RHWVm7w==:117 a=Qosx6O6xXGET3N4RHWVm7w==:17 a=N659UExz7-8A:10 a=D8CxWFo_LkbdXIiNmeEA:9 a=pILNOxqGKmIA:10 Message-id: <55FD7982.9030505@eastlink.ca> Date: Sat, 19 Sep 2015 08:04:34 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: autoload References: <55FAE223.2080502@eastlink.ca> <150917103419.ZM10067@torch.brasslantern.com> <150918171441.ZM27212@torch.brasslantern.com> In-reply-to: <150918171441.ZM27212@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit 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 ...