[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues with exported functions
From: |
Greg Wooledge |
Subject: |
Re: Issues with exported functions |
Date: |
Wed, 24 Sep 2014 15:53:10 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Sep 25, 2014 at 03:44:23AM +0800, lolilolicon wrote:
> Otherwise, if this feature is going to stay (can anyone enlighten me why
> it's useful?), please document it explicitly.
First, it is documented:
Functions may be exported so that subshells automatically have them
defined with the -f option to the export builtin.
(Good luck finding that if you didn't know to look for it, though.)
Second, it's "useful" in niche cases like this:
foo() { ...; }
export -f foo
find . -type f -exec bash -c 'for f; do foo "$f"; done' _ {} +
So, if Chet removes the feature, it would probably break something that
someone cares about. Maybe there could be a compile-time option to
disable it. Maybe there already is -- I didn't look.
- Issues with exported functions, lolilolicon, 2014/09/24
- Re: Issues with exported functions,
Greg Wooledge <=
- Re: Issues with exported functions, lolilolicon, 2014/09/24
- Re: Issues with exported functions, Linda Walsh, 2014/09/24
- Re: Issues with exported functions, lolilolicon, 2014/09/25
- Re: Issues with exported functions, Pierre Gaston, 2014/09/25
- Re: Issues with exported functions, lolilolicon, 2014/09/25
- Re: Issues with exported functions, Pierre Gaston, 2014/09/25
- Re: Issues with exported functions, lolilolicon, 2014/09/25
- Re: Issues with exported functions, Chet Ramey, 2014/09/25
- Re: Issues with exported functions, lolilolicon, 2014/09/25
- Re: Issues with exported functions, Linda Walsh, 2014/09/25