Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: autoload
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author