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

Re: Wordcode files and compinit



Andrej Borsenkow wrote:

> I understand, for compinit to work I still need to have both source and compiled versions
> of completion functions? Some vague idea (probably, a step toward a "real" packaging) - we
> already keep quite a lot of information in wordcode files. What about adding a bit more -
> general "package name" (package id or how it can be called) and per-package specific
> information.
> 
> This would allow you to select package functions you want to load, and compinit could
> extract the same info as currently from comment. Something like
> 
> autoload -P completion
> 
> would add all completion functions but not zftp functions. That will still allow you to
> install everything by default but select just what is needed.
> 
> Of course, package name may be hierarchical ... completion/Debian :-)

Just a quick thought...

Hm. The wordcode files already store the complete pathnames used when
calling zcompile. That could be changed to prepend $PWD to names not
starting with a slash. Then we could change the patch for `autoload -w'
to make `autoload -w foo.zwc a b c' mark only a, b and c for
autoloading. And then we could make `autoload -mw foo.zwc "*/Completion/Debian/*"'
mark only those functions for autoloading.

I confess that I hadn't thought about combining wordcode files with a
package concept, although this now looks like a rather obvious idea...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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