Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: New problem with ERR_RETURN ?
- X-seq: zsh-workers 51117
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: New problem with ERR_RETURN ?
- Date: Wed, 7 Dec 2022 16:37:57 +0000 (GMT)
- Archived-at: <https://zsh.org/workers/51117>
- Importance: Normal
- In-reply-to: <CAH+w=7Y-rW_Lid-2F1JK+UC+2tG2F7yPfcguC86-sWR0MpG+-g@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Y-rW_Lid-2F1JK+UC+2tG2F7yPfcguC86-sWR0MpG+-g@mail.gmail.com>
> On 07/12/2022 16:17 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> After zsh-workers 51001, 51071, 51076 (Philippe A.)
>
> This seems wrong:
>
> % setopt errreturn
> % f() {
> while return 5
> do
> echo fail while1
> break
> done
> }
> % f ; echo $?
> %
>
> Note that "echo $?" was not executed when it appears in the same
> command line as "f".
I haven't had a chance to look but I'm guessing this is something
along the lines of not properly restoring the "breaks" variable when
we return from the function, or some equivalent lack of care
with "retflags".
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author