help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] break and continue inside subshells


From: Glenn Morris
Subject: Re: [Help-bash] break and continue inside subshells
Date: Fri, 19 Oct 2012 14:13:41 -0700
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Thanks for the helpful answers, everybody.

Dan Douglas wrote:

> The subshell is still aware of its context (being that it's a fork
> with essentially a copy of the parent environment), it just is
> isolated from the parent process and can't affect its control flow, so
> a jump to the end of the subshell seems reasonable.

It doesn't seem that reasonable to me. I could/would have written "exit"
if I just wanted to jump to the end of the subshell. If I wrote "break",
then I almost certainly have a bug, and it would be nice if bash warned
me about it, like it does when there is no containing loop at all.




reply via email to

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