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 25485 invoked from network); 8 Dec 2022 09:24:19 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 8 Dec 2022 09:24:19 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1670491459;
b=PnVjT/SQNosEuZc8umqr9xs++I7uP+K0fTT4Zab+9ZiZoaiJrVmYRSuHcIWGJQCdJIo49hjqrL
isWJyyYjV1SaFi/C8jpy4K2IocwL+mZQ9JJDH8utaZr7Ww/z6iQYDyoy0N0CuSJ2i/b8dR06j4
mCeQRCiysHiqCspStYQhPEQMWmBWkOuQIxYjKb0lEd6qbPEWEd5MPwxqEb92vP/iNzssSdiy/T
5ZgkCJgKej5424suIAA8dlLeVASsA+6MgDR+Ug9K5xlcJ1chOgZebv/QQZbIW+rfbNcOx1Tkg/
HM3VwaobDBnwAUttSk79lAzuqcWllBAcqqw773wvaBHIjQ==;
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=1670491459;
bh=pNtdO5+4lCf0faEhuWNsCmLakcXeAjv7QZXVt72VYO8=;
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=jdYWjWmT+DqZgC567n5kfMZSXWjrHjIuJSm21EbzHeffYptwdzGB/4wCYgdx52BAR1rdwAgNHi
SwUgWjpjDJ4DvTMMddmoA+JfZGxnTUs5CUXUt35d5eb6lUdWqRtwqbH2r203yLaPzowgAmfjSK
hfy4ppJUWEPmXWbxokf+9DByMTL4FMWCmqYJ3/gf2JkNud6Ol5Z7nIBsEhIyEWXI/sZyoWIXqj
Issn2mBO/qDAsOiRONIRYpx2Iuv2iZI6Xwlt+XylqtHwTT97HrfhgkrKp7kOxQHhfLL4HpS2lr
VtJeux1DvKOGcQHdn04PpgJxz0yPvZgZZlMSiwsLtNQ/rQ==;
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=R1bdefm8bocIXv48rMkI5gSv8WX4XGk9tVRxq8fDONs=; b=cSlM+QvmTs3IT3DRhZs5ivqb6W
oxTCcJ8adMY2isaio049vwiWiTS8tAH+HTC6bHqlEz3uxB+UgJynYw2uiYUcmLLLkj8zhqBvfa+57
PM1X9GcVIbcaHz7xB1KOXINH4Kq9hEzvdF3XshBva6bjj246182IIdRxLqK/xbtBcDOwzK5oUQk93
WbA7L9U5CYGV07Zm5KAqCrFKHDZ9Eb35f7uOiGbh0k5mILq6yXfJrpAD5l7O1TwkVkezZmgObV3I/
x89GUVzFAipg3megXgKZJyjVMjiiaJsGlLqgL4VDTWKLN7HuBz5yu+PQHvAITMYoTHE3FEDxj6WLL
v5IDAZ/A==;
Received: by zero.zsh.org with local
id 1p3D8d-0008Oz-6r;
Thu, 08 Dec 2022 09:24:19 +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]:34994)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
id 1p3D8L-00085w-DA;
Thu, 08 Dec 2022 09:24:02 +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 1p3D8K-0004uL-Ta
for zsh-workers@zsh.org; Thu, 08 Dec 2022 10:24:01 +0100
Received: from oxbe24.tb.ukmail.iss.as9143.net ([172.25.160.155])
by smtp1.tb.ukmail.iss.as9143.net with ESMTP
id 3D8KpAsm25gto3D8KpubiP; Thu, 08 Dec 2022 10:24:00 +0100
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 172.25.160.155
X-CNFS-Analysis: v=2.4 cv=cvhd0X0i c=1 sm=1 tr=0 ts=6391ad30 cx=a_exe
a=7eg3RIOFpSGgz8rG3xBEDw==:117 a=1DWFKdCB1IcA:10 a=IkcTkHD0fZMA:10
a=ZjyAdWuDOD4A:10 a=HYshxDoSAAAA:8 a=94thRD8xEaMHm4B0njkA:9 a=QEXdDO2ut3YA:10
a=na7qQM7zoEAPfvOk0o6d: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=1670491440;
bh=pNtdO5+4lCf0faEhuWNsCmLakcXeAjv7QZXVt72VYO8=;
h=Date:From:To:In-Reply-To:References:Subject;
b=evwYKF7OwXFPGWAWOo5gdWbtK7XehFfwy7W5PA6s65risnunkJ5ljHLdRe9c0RC1Y
ABD6NqmCSm6j6FyfqeRop38chDEowEC0W2mpAHJYZH0YTXFU/N4Bv1DAf2uORSwigx
6Ga0F/n8WSswdQ4P2FIwfEImnsMMxBrVb4wsPch4HHmc1d5wKQ/DC1y5gqSHqgBkFo
i83KaicmXxfYOpXy7BXDf0gRWYWneh+MXjEdbH++H0Uq7ajsDNbothFztVdtVm03HD
axcS7YG0V89aTe10V+Nuq5Ge40+pLSI8mEFF1s0XJcbRnPWNJdWfVv24xLv7EfdlEy
OpM8CkAf6SYvA==
Date: Thu, 8 Dec 2022 09:24:00 +0000 (GMT)
From: Peter Stephenson
To: zsh-workers@zsh.org
Message-ID: <1965529659.1839688.1670491440623@mail.virginmedia.com>
In-Reply-To:
References:
<1294443392.2122422.1670431987664@mail.virginmedia.com>
<1536100214.2124060.1670432862096@mail.virginmedia.com>
Subject: Re: New problem with ERR_RETURN ?
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
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: MS4xfIzEmr0XuzWi5MFQ9N6ut103sfFSXt4NyLx7j+ZYtvWxisOgim9cowwNMZ+P2u7qs+uszdE3sIEhNefuRqgHIa8NfaBjrGlK1JwgTkEfY90ifOsbY6VY
q0BMTEfu0hRQ4cSpkXOgsuN4PUfUTRQ71EEVXoBm3Qxg1ZEmdjV0UPOuIneuaod14AgTOvHoQq2neEvbIiqWomTxkWZAXo/1Syn2uS7VF03kQML7CJR++J6M
X-Seq: 51134
Archived-At:
X-Loop: zsh-workers@zsh.org
Errors-To: zsh-workers-owner@zsh.org
Precedence: list
Precedence: bulk
Sender: zsh-workers-request@zsh.org
X-no-archive: yes
List-Id:
List-Help: ,
List-Subscribe: ,
List-Unsubscribe: ,
List-Post:
List-Owner:
List-Archive:
> On 08/12/2022 06:05 Lawrence Vel=C3=A1zquez wrote:
> Bikeshedding perhaps, but this sentence already exists just above:
>=20
> =09This will trigger an exit at the outermost level of a
> =09non-interactive script.
>=20
> Maybe any new text should come right after this? That would keep
> the explanations about how ERR_RETURN affects behavior at the top
> level in one place.
That will make it more compact, too.
pws
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 445052617..e92969531 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -1744,6 +1744,9 @@ Exiting due to tt(ERR_EXIT) has certain interactions =
with asynchronous
jobs noted in
ifzman(the section JOBS in zmanref(zshmisc))\
ifnzman(noderef(Jobs & Signals)).
+
+Note this behaviour is not disabled in interactive shells ---
+a non-zero status on the command line causes the shell to exit.
)
pindex(ERR_RETURN)
pindex(NO_ERR_RETURN)
@@ -1756,7 +1759,10 @@ If a command has a non-zero exit status, return imme=
diately from the
enclosing function. The logic is similar to that for tt(ERR_EXIT),
except that an implicit tt(return) statement is executed instead of an
tt(exit). This will trigger an exit at the outermost level of a
-non-interactive script.
+non-interactive script. At the top level of an interactive shell,
+it will trigger a return to the command prompt; in other
+words, the sequence of commands typed by the user may be
+thought of as a function for this purpose.
=20
Normally this option inherits the behaviour of tt(ERR_EXIT) that
code followed by `tt(&&)' `tt(||)' does not trigger a return. Hence