From mboxrd@z Thu Jan 1 00:00:00 1970
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham
autolearn_force=no version=3.4.4
Received: (qmail 30513 invoked from network); 28 Mar 2023 11:28:49 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 28 Mar 2023 11:28:49 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1680002929;
b=GCRvQ6zQrnV7X/oY+DhE22SmGjkL0e6DU+wJ7hf/DMTzDA0h1yPOWqghe3KLhcSTip+kdvxkBU
8rMC958GHjdnQO/AePjirkz2a+j1yudM3F5wlM+1a/zbYHyjqtUZTpdoOytV+9rmG73A6D1YjM
VYd8RxxKCSP8dQ94MWaXcHOB8xvzLDTPsBRgSopiC9CIX7NO5tvWrWZ8++GswDN0QTKlieWEAA
6TBSrPyqVz3ZYr5PGEQHnVIIsGZpN1ZVE0mTo1+U99PdAB1uO8grzmrhVEn1FHTgSl/LuvXWKz
lVuWmohTPacJCN30znU5zQVPYhrGY5KptMB3NMxlPesikA==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1680002929;
bh=io3lqAFd+LwKk29d2Ke8snrOf+RtduC2+6dMygN9dAY=;
h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help:
List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:
References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature:
DKIM-Signature;
b=axxYSFL5uqVWdQ0qiMnHbUs5qC2kLXY7Y1FQhFmsRRLT/8OhqOURNXr6g4KeaFrx3yrL3ySU5P
cPjRcLLEUOxtsZauz1PJcudrxKpSc+IxjAcbKyOnSidHapJRRDogVB1xfbASeHZg7lVUvjOIgI
rbKb9eHrznN0OnP+ZVVeb3B+KEVADHYRfqgVyp94/MqEarHlv3aUMtH492+uVbMGgcRw1UfcWh
PLMGaqQMLKo4DlBQRGJDppSATkhO667bcGoFWqqCpHF2MO+Gmh7Z1vqT3ZYcu2qloZfCw8jgMk
uVPDF1EOoo4uqx1kaUBp7O2ykjLm4BvAlrwzMxMOjJNRrg==;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org;
s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:
List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding:
Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From:
Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=x64fO8h++Gy+e4p3Z9+ws+88+cHVz3Dvzpa2M+TLNc0=; b=hNWfCjaAgJiQ93VJA10YxG4S/z
IzmOW22oLUIxP1sQDw3VB0H0vbJiRWvBfh38/BCPprZDYWo1gOukgRfom3INbIdEFJmoh1YHkuUCs
1Wvqf9jKRCaieVic3enXY5g/bEDM9HkbV371raz6XfIv4Y2vwxC7yVOL3WmgOzn5qWhT7duR7rmuk
M/X/c7tYzKoBd28c98yQzgg9OGtQxDpFt6xGLFbUG2rPtmcDOooVeQKjBbeC+tE7+5i+UtfL2xLwU
xcPpIpZqDAcgakQ+v1CM87hrG3OENEEz8/OjrLfqYhpxDhIUz//WWmE4hxe/womEWbcN5vrHNk42+
pUoCNsRw==;
Received: by zero.zsh.org with local
id 1ph7VR-0004Pq-AS;
Tue, 28 Mar 2023 11:28:49 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:53104)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
id 1ph7Ul-0003gp-Nt;
Tue, 28 Mar 2023 11:28:08 +0000
Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net)
by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1)
(envelope-from
)
id 1ph7Uk-00079L-OB
for zsh-users@zsh.org; Tue, 28 Mar 2023 13:28:06 +0200
Received: from oxbe9.tb.ukmail.iss.as9143.net ([172.25.160.140])
by smtp1.tb.ukmail.iss.as9143.net with ESMTP
id h7Ukpl5e4tFi3h7Ukpx916; Tue, 28 Mar 2023 13:28:06 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-users@zsh.org
X-SourceIP: 172.25.160.140
X-CNFS-Analysis: v=2.4 cv=cdQU7FPM c=1 sm=1 tr=0 ts=6422cf46 cx=a_exe
a=3Amxf2QPfMiVt6ICWsHjRQ==:117 a=1DWFKdCB1IcA:10 a=IkcTkHD0fZMA:10
a=NLZqzBF-AAAA:8 a=pGLkceISAAAA:8 a=tva-yKi3etz7V3n0924A:9 a=QEXdDO2ut3YA:10
a=75Kt_H3ikK-EkTT1woid:22
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1680002886;
bh=io3lqAFd+LwKk29d2Ke8snrOf+RtduC2+6dMygN9dAY=;
h=Date:From:To:In-Reply-To:References:Subject;
b=ABazZF07tDCbdl6e6bp9qSzj6aI33qHvRX1dBS8VYsXCFvXi7mmXC8BOyIO3BF7Zy
W1ufjueZFSCrR3JDdhoP/ANj4xoqk/9SoqUZ2xmCAz71s93cUQvs6WjPJJY1TmUHo8
m7Rl++1C70mx3PdBxkz66VkkLNBso5hKxyNB48pcpL/XezBiZL7NAyNPc7bz2A6o8T
/L27Tk8IxN/0uJDJzGdHRZApwphu1aX5rnXWkE6DyYy800i8sMSJ3sXREeMQnLJtWN
740ThilBPhtiK9Erlwe3olEQASlcxNLztgjtbQzEIsn9o6UjkLMpnqhlGQCtO3dZ4q
6cf/BAUfhvgUA==
Date: Tue, 28 Mar 2023 12:28:06 +0100 (BST)
From: Peter Stephenson
To: Zsh Users
Message-ID: <805138511.3622784.1680002886460@mail.virginmedia.com>
In-Reply-To: <16795430.3614208.1679998628194@mail.virginmedia.com>
References:
<16795430.3614208.1679998628194@mail.virginmedia.com>
Subject: Re: Bug with continue?
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer
X-Originating-IP: 147.161.224.167
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfK+MCV2rXaZrOmikYofJI49+Qb9nOKC7EyaVYXYqU4ID7o5JE/YiZgy5RjMMUPUAqWzhHpBsiMl5TG0Y5K5Co8jZ06zV1XGP+wcTGbUWhMgLS2lWfoiV
Z+TywuPRQPiXFB1eFNzFWm0qpTgXwBfEXQBT9dSMpcdMT4rVETh/XiOrBxNG4DqjojcvivlZhzh7HWNqDAMFpTXSefvj8G85ejcsAOMPlXPMgEPcanpvrLai
X-Seq: 28990
Archived-At:
X-Loop: zsh-users@zsh.org
Errors-To: zsh-users-owner@zsh.org
Precedence: list
Precedence: bulk
Sender: zsh-users-request@zsh.org
X-no-archive: yes
List-Id:
List-Help: ,
List-Subscribe: ,
List-Unsubscribe: ,
List-Post:
List-Owner:
List-Archive:
> On 28/03/2023 11:17 Peter Stephenson wrote:
> > On 28/03/2023 10:32 Felipe Contreras wrote:
> > I notice this works differently in zsh than in other shells:
> >
> > for x in 1 2 3 4; do
> > continue &&
> > list="$list$x " &&
> > echo "x: $x"
> > done
> > echo "list: $list"
> >
> > Why did the statement after `continue` gets evaluated?
> >
> > The original code tries to do something useful `case "$x" in 1)
> > continue ;; esac &&` but it shouldn't matter.
> >
> > I tried in bash, ksh, and dash, and all of them continue immediately,
> > except zsh.
> >
> > That can't be the desired behavior, can it?
>
> That looks like it probably ought to be regarded as a bug to me, yes ---
> I guess it's been hidden because the test "if this statement successfully
> jumped somewhere completely different then..." isn't spectacularly useful.
> However, it's not logically wrong, either.
>
> I think we had something a little similar to this recently; it usually
> boils down to something quite simple once you've found it and I'll
> have a look when I've got more time. (Patch would go to zsh-workers.)
The bug I'm thinking of is zsh-workers/51125, though it looks like I
committed the fix under zsh-workers/51134. That was about wheter
"! return" should invert the status of the return given it's already
returned by the time that would happen. This is similar, but looks
like it's not the same.
This one is a little weird as if the immediately next statement is a
print it doesn't get executed. I'm suspecting some subtlety with handling
retflag.
pws