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

Re: autoload

On 09/17/2015 10:34 AM, Bart Schaefer wrote:
On Sep 17,  8:54am, Ray Andrews wrote:
} Subject: autoload
}      # Assume starting here with the default $fpath

I think the problem here is that you've put a .zwc file IN a directory
that is itself listed in $fpath.  This is typically a no-no.  You want
a .zwc file to be treated as if it WERE a directory, NOT as if it were
one of the function definition files IN the directory.

I'm close to certain I haven't, here's all .zwc on my system:


See, zcompile (without the -t) is attempting to parse Base.zwc as a
function definition, and getting what looks like garbage to the parser.
(I have no idea where those spaces in the path are coming from.)

It isn't possible I've somehow screwed up $fpath? I understand it's hard coded at startup, least it seems to always be restored. Anyhow I've not moved or played with Base.zwc. I did try
creating a .zwc yesterday but it's long dead.

This seems to be the troublesome line:

     zcompile $zsh_default_functions $^fpath/*(N.:A)

... on a hunch:

zcompile $zsh_default_functions $^fpath/*(N.:t) << 't' being a new friend

... the previous error msgs are gone but:

    $ zsh
    /aWorking/Zsh/Boot/ztest:zcompile:13: can't open file: _bootctl

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