bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues with exported functions


From: Steve Simmons
Subject: Re: Issues with exported functions
Date: Thu, 25 Sep 2014 15:33:23 -0400

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

> On Fri, Sep 26, 2014 at 2:28 AM, Ángel González <angel@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

[Prev in Thread] Current Thread [Next in Thread]