bug-bash
[Top][All Lists]
Advanced

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

Re: Issues with exported functions


From: Chet Ramey
Subject: Re: Issues with exported functions
Date: Thu, 25 Sep 2014 15:40:38 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 9/25/14, 2:47 PM, lolilolicon 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").

Not quite.  While autoloaded functions are lazily evaluated, you have to
pay the price of searching $FPATH and loading them in every shell, and
there still has to be a mechanism to indicate which functions should be
autoloaded in each shell.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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