Chet Ramey wrote:
> Björn Augustsson wrote:
> > fun_bad() { local bah=$( false ); }
> > fun_good() { local bah ; bah=$( false ); }
>
> The `local' command returns success if the variable assignment succeeds,
> which it does.  The command substitution doesn't affect its exit status.
> This is how all builtins that affect variable attributes (declare/typeset,
> export, readonly) should behave.

Note that this is also the way "export" works too.

Bob


Reply via email to