zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: "break" and functions
Date: Fri, 29 Mar 2024 10:30:07 +0100	[thread overview]
Message-ID: <CAHYJk3QZmz0v1Vc3PxfAOGz=Tj-2MFQAO4Hj969kO1QXXpq6Pw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bb9BKUCvqCb=A-Qw36+HVn-NszP2DfQeXsYmKs-HVWFg@mail.gmail.com>

On Fri, Mar 29, 2024 at 2:55 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Wed, Mar 27, 2024 at 3:22 PM Oliver Kiddle <opk@zsh.org> 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.

51608

-- 
Mikael Magnusson


  reply	other threads:[~2024-03-29  9:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  1:54 Bart Schaefer
2024-03-29  9:30 ` Mikael Magnusson [this message]
2024-03-29 16:28   ` Bart Schaefer
2024-03-29 16:56     ` Bart Schaefer
2024-03-29 17:38 ` Oliver Kiddle
2024-03-29 18:51   ` Bart Schaefer
2024-03-29 21:14     ` Mikael Magnusson
2024-03-29 22:02       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3QZmz0v1Vc3PxfAOGz=Tj-2MFQAO4Hj969kO1QXXpq6Pw@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).