From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12237 invoked by alias); 18 Sep 2015 05:00:05 -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: 20581 Received: (qmail 19713 invoked from network); 18 Sep 2015 05:00:03 -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=zebyiQhrbmDl3XZzCDMMUg==:117 a=zebyiQhrbmDl3XZzCDMMUg==:17 a=N659UExz7-8A:10 a=fmp6DcecrqIuQxJCn_wA:9 a=pILNOxqGKmIA:10 Message-id: <55FB9A50.4060903@eastlink.ca> Date: Thu, 17 Sep 2015 22:00:00 -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> <55FB12FD.8000504@eastlink.ca> <150917134047.ZM10250@torch.brasslantern.com> <55FB476F.7080106@eastlink.ca> <150917162009.ZM10431@torch.brasslantern.com> <55FB66E8.5030503@eastlink.ca> <150917210453.ZM12575@torch.brasslantern.com> In-reply-to: <150917210453.ZM12575@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 09/17/2015 09:04 PM, Bart Schaefer wrote: > On Sep 17, 6:20pm, Ray Andrews wrote: > } Subject: Re: autoload > } > } Anyway, those .zwc files are in the Debian package, I just checked. > > In that case you should probably just do: > > autoload -w $^fpath/*.zwc(N) > > and forget about rebuilding from the source functions. Yes, that was quite the red herring there. Interesting that Debian does things differently like that. I suppose they are free to, but it still seems strange that there'd be no doc to the effect that their package is different from std. like that. Maybe it's not to be expected. I guess the 'line 5 `)' error mystery is best forgotten. Very strange tho. I'm trying to get the autoload system working with my own functions and I'm almost there. " /aWorking/Zsh/Source" is where they live, and I've called them like this: for aa in /aWorking/Zsh/Source/*; do source $aa; done ... which was the first thing I learned about such things. They are all 'normal' functions and most files contain more than one. Now I'm trying this: $ fpath=( /aWorking/Zsh/Source "${fpath[@]}" ) $ source miscfunctions $ autoload -w /aWorking/Zsh/Source/Source.zwc $ l [ nothing ] $ l [ now I get listing ] ... in the docs there's talk of this--loading vs. loading and executing--but I can't figger it. I've tried 'zcompile -k/z ...' and 'autoload k/z ...' but no combination seems to prevent the first call to any function from being inert. 'zcompile -t ...' always shows me a list of files, not functions. Strangely there seems to be no trouble with multiple functions in one file except in the case of 'miscfunctions' so I have to source it separately. (The other multiple functions are all help functions only called by the main function in each file. I don't know why that makes a difference, but it does.) Also, I wonder why $fpath needs to be modified since 'autoload -w' is given an explicit path to the .zwc file, so should hardly be concerned with looking for it via $fpath. I'd expect it to be hashed and that's that.