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.

Reply via email to