On Tue, Jul 30, 2013 at 12:29 PM, Chris Down <ch...@binary.com> wrote: > On 2013-07-30 12:11, Pierre Gaston wrote: >> what about things like this: foo () ( return 1; ) > > Except in this case, the return has a valid context. I don't see how it's > really > comparable to the represented case.
It's a return in a subshell in a function, i don't think the comparison is far fetched. I see what you mean, but that raises the question of what's a valid context. Should we make a special case if the subshell is the "outer" compound command of a function? The same thing with by break and continue example: while :;do ( while :;do break 2; done);echo foo;done Should this raise an error? is the break in a loop context? what's a loop context?