On Sep 25, 2014, at 2:47 PM, lolilolicon <loliloli...@gmail.com> wrote:

> On Fri, Sep 26, 2014 at 2:28 AM, Ángel González <an...@16bits.net> wrote:
> [...]
>> On the other hand, this approach would be much more interesting if bash
>> delayed parsing of exported functions until they are used (ie. check
> 
> This is what function autoload is for in zsh. It's indeed a better
> approach. It was also suggested by Dan Douglas in this thread ("FPATH
> mechanism").

Autoload has plusses and minuses. Shell startup is initially faster because 
there's a lot less processing, but each not-yet-loaded function requires 
traversal of another search path. And if you have multiple levels of shell 
(who, me do :sh in vi?) any newly spawned shells in the same session don't get 
the previously loaded functions. Unless, of course, autoloaded functions could 
be exported. But I'm not gonna think about that right now, got a lot of work to 
do.


Reply via email to