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

Re: autoload



On 09/18/2015 09:52 AM, Bart Schaefer wrote:
} I see.  Nuts, there's nothing about that in the docs is there?

There's an entire section for "Autoloading Functions" but it has no
cross-reference from the "autoload" builtin (autoload points to
functions points to typeset which finally does have the section
reference).  I'll rearrange this a bit.
What would be sweet is a self-contained HOWTO sort of doc that walks you through the entire subject with real world examples of solutions for real situations. IOW, instead of focusing on a command, it would focus on the goal: "Say you want your functions to load faster. Up till now you've been sourcing them at startup, which is fine, but
you can do much better ...."  ... 20 minutes latter you are cooking.

}
}      $ for aa in /aWorking/Zsh/Source/*; do source $aa; done

You can do that:

FPATH=/aWorking/Zsh/Source autoload +X -w /aWorking/Zsh/Source/Source.zwc

The +X option is documented and means "load this now, but don't run it."

Ha!  Just when I'd decided to give up.



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