bug-bash
[Top][All Lists]
Advanced

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

Re: Issues with exported functions


From: Pierre Gaston
Subject: Re: Issues with exported functions
Date: Thu, 25 Sep 2014 11:49:51 +0300

On Thu, Sep 25, 2014 at 11:06 AM, lolilolicon <lolilolicon@gmail.com> wrote:

> On Thu, Sep 25, 2014 at 9:35 AM, Chet Ramey <chet.ramey@case.edu> wrote:
> > On 9/24/14, 3:44 PM, lolilolicon wrote:
> >
> >> Personally, I have never needed this feature. I would vote for its
> >> removal: It's very surprising, creates bugs, and is not very useful.
> >
> > There are more things in heaven and earth that are dreamt of in your
> > philosophy.
>
> OK guys! Exported functions are widely used by experts, I get it now.
>
> >
> >> Otherwise, if this feature is going to stay (can anyone enlighten me why
> >> it's useful?), please document it explicitly.
> >
> > Function export is documented.  The exact mechanism need not be.
>
> Sure, the mechanism need not be documented, if it didn't matter on the
> interface level. But it does. In particular,
>
>     % pat='() { $:*;}' bash -c 'tr "$pat" _ <<< "(x){1}"'
>     (x){1}
>
> (This is bash 4.3.25)
>
> This is not the best example, but you get the idea.
>
> Perhaps you have plans to change the implementation?
>
>
How many instance have you found since the introduction of this feature
more than 20 years ago?


reply via email to

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