Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
"break" and functions
- X-seq: zsh-workers 52844
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: "break" and functions
- Date: Thu, 28 Mar 2024 18:54:24 -0700
- Archived-at: <https://zsh.org/workers/52844>
- List-id: <zsh-workers.zsh.org>
On Wed, Mar 27, 2024 at 3:22 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> Perhaps worth including in a test case is the following which does
> break after running the echo.
> while :; do; echo ${|REPLY=x;break}; done
When adding this, I ran into a puzzling effect:
% while :; do; echo ${|REPLY=x;break}; done
x
% while :; do; () { echo "$@" } ${|REPLY=x;break}; done
%
That is, breaking the loop skips the function call but does not skip
the builtin.
I think something like this has been mentioned before in different
context, but it's not easy to search for.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author