Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Loops and pipes



On Sun, Aug 23, 2026 at 3:41 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Here is an alternate version of the second patch that emits a warning rather than an error when breaking/continuing beyond the outermost loop in the same subshell. This version also prevents "continue" from continuing the outermost loop when continuing beyond it. The following script will only print A (and a warning), while it currently prints A, B, and C.

I remain uncertain about this because both bash and ksh silently
continue the outer loop on "continue N" for N > number of enclosing
loops, that is, they print A B and C.

Bash has the same warning (error?) in subshells as was added in the
first workers/55061 patch.  Ksh silently proceeds in both instances.




Messages sorted by: Reverse Date, Date, Thread, Author