Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Loops and pipes
- X-seq: zsh-workers 55053
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Loops and pipes
- Date: Fri, 31 Jul 2026 20:55:22 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XZhZAFtRiDVsYZIES3hsBD1schgDlChH0r5ur6V2bB0=; fh=BgAYDYpL6Ne/A5nWEMVJiHiBtrz8Imz3uf26RDwgQX4=; b=jf5nIAkDVsojn7AFCv0jEoDrEVM2HDWeEwl+y4dQFaIkRi72wF35kXKSTxamvu3+gz cu7xsbDICXCmP95cs2PgoxAZ+jLnpW52tgyoRuL5VDS9+jSlMWYvN1tV65/+uUKNMWcF EfmrSHlIof8qRIdkxBsgeSmwVfGq0+9P/qQfTvcbeHJgEiTihKvCUP29n4iYK0YA9Iad JtrZA8UoNiT7ogNdqFEFaYbHNDiybaf05PduF8X3sGDlOGY9E09e6aIBAr9pgD2mIh9Z rv5L625cbVup4M/KYsi/4Gh5y9dZqJkVyb+tLkqGHkqK/WJ/OApOVuUUZUsNFZGGrAJE k7pw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1785556534; cv=none; d=google.com; s=arc-20260327; b=VWAU34ZqfPgq46b+5+SNaeHPYh3FPPhFaOdCKKAORG6cZlUIyP5jP+zA2e6ais8nAd Fvy4oGN6OVuOlrT/PCjTA9xCefp2CyYfBSdUseHtsVnBiPc1iAAPQqN4Ts9DeigIQalW zc0Hj1eYRouAJ3o1oZNTeA5kpjbxOxB2GpJhUJAYQ3hR18ncJbXQ8iGg53lJ4J6LqEkb N3JGPpecKpkzCZOMrehkshx6N6xYC3ngfhgFj0j41OAakCoLARm+z62w8gCVSoUCIXN1 dLgJVjfeNVVzSmC/BB4qwl3dLQvr5FDWwLO4b83XKW7T4npIQ4gR7MZBb+ms4amKnFPn uYZQ==
- Archived-at: <https://zsh.org/workers/55053>
- In-reply-to: <CAH+w=7aqY8wsSSczg_79gPzeA2zfQA=hLhKhXXnLLgNKK_0GKQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7aqY8wsSSczg_79gPzeA2zfQA=hLhKhXXnLLgNKK_0GKQ@mail.gmail.com>
On Fri, Jul 31, 2026 at 2:38 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> continue and break on the left side of a pipe are useless.
I see that it's not completely useless.
> Would anyone have an issue with break / continue causing an error if
> either appears in a subshell where the surrounding loop is in the
> parent?
Counter-example:
for x in 1 2 3; do (echo IN $x; break; echo OUT $x); done
IN 1
IN 2
IN 3
It'd take some finagling to get break/continue to propagate up. Hijack
a signal? Reserve an exit status of the subshell?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author