Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Loops and pipes
- X-seq: zsh-workers 55051
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Loops and pipes
- Date: Fri, 31 Jul 2026 14:38:57 -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=to:subject:message-id:date:from:mime-version:dkim-signature; bh=p10ACQ8GdoxkdTvoHd3Y+8CWKU7UUnzpmGzpDKQwX/U=; fh=BgAYDYpL6Ne/A5nWEMVJiHiBtrz8Imz3uf26RDwgQX4=; b=aggy3pRqUK+4idDEqE+JWEgJcpJ63R+BlX61F3T+tTtu5dMFoDwPeMibDJTkXkGZsx usC7jjyZ5ZOrM24kCO2kpU63ydyX8UPbXXmsqmpElxjw3oXLw1+dlkodSPXwPufxpBeC flBfSo9VUIdACZeyKgVmvwlB65tV10GJHQ/0FV7nTLVS+LdD9/IlZVg9lb7vca6foW5s TBv0Yd7uzfQ1WXvotmeeMKSrBns7FZpSnJep07DFZ6gMCfSxB9fIZTFKZOG0hBpC3SyT Pi+vIKoJheKUvdT56idC4jwTUtcOBDUz0sIDQ3zuXj/Ov2FvZvdexJxTqTgMxpMaUN/0 Br3Q==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1785533950; cv=none; d=google.com; s=arc-20260327; b=UAmRU6n/G95zUYTnn0+WybAg5OtbMubRAqx6WbYNT3K6FQrAeZUiXMrqh+Odw2eWqm cVUMfq1w8mg7DQGmjMuyhOYPSyAes4lJcib2zK0X7ASumdtG+YnL6CklZ4fQsUvQmw56 CUB7ObREMJcFUzqqnLeXG6IYWDG1OymdPaT+wClg8b7lq5+TCpQN0F2r4xKaQUMpuxFy XqXR8y7Gbi/gdArIYBKbVVIy5eqe/qpEOpCkD6Cm1ukErUiscSFzv4OsnqdE1OChoIYA Sl5omF2Wn1aDDvTFFPca1eDrWvQqao9CuKjoSxo53JMTRVBxBnyInS7VXvtfh3lWuruh liYQ==
- Archived-at: <https://zsh.org/workers/55051>
- List-id: <zsh-workers.zsh.org>
This should have been obvious in retrospect, but it just bit me:
continue and break on the left side of a pipe are useless.
Stupid example:
for x in 1 2 3; do
{ echo $x; false || break } | read -E
done
1
2
3
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? (I have not yet investigated implementation.)
Tangentially:
% continue
continue: not in while, until, select, or repeat loop
Shouldn't that also mention "for" loops?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author