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

Re: autoload

On Sep 17, 12:22pm, Ray Andrews wrote:
} Subject: Re: autoload
} On 09/17/2015 10:34 AM, Bart Schaefer wrote:
} >
} > I think the problem here is that you've put a .zwc file IN a directory
} > that is itself listed in $fpath.
} I'm close to certain I haven't, here's all .zwc on my system:

The issue isn't (just) what your .zwc files are, it's also what you
$fpath contains at the time that your .zshrc or whatever is loaded.

E.g. $^fpath/*(.) appears to include
as one of the matching files.

Therefore /usr/share/zsh/functions/Completion must be in the default
$fpath, and what I'm saying is that you should not normally put Base.zwc
in a directory that is in $fpath.

} It isn't possible I've somehow screwed up $fpath?  I understand it's 
} hard coded at startup,

Yes, and the problem is that you've put .zwc files into the directories
in that hardcoded list, but then tried to use the hardcoded list to
(re)build yet another .zwc file.

I'm not really sure how further to explain this.  The sample code that
I provided takes EVERY DIRECTORY that's in (the default) $fpath and
packs ALL the files under them into ONE .zwc.

You on the other hand seem to have already built a separate .zwc out of
EACH directory of the default $fpath.  If you're using my example, you
don't need to do that - you should throw all those .zwc away and use
the single one that my sample builds.

Or conversely you should not use that example.

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

A different enemy, more like.

} ... the previous error msgs are gone but:
}      $ zsh
}      /aWorking/Zsh/Boot/ztest:zcompile:13: can't open file: _bootctl

The :t discards /usr/share/zsh/... and leaves just a base file name;
that might work for autoload but won't for zcompile.  You need the
full paths, just not the .zwc files.

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