zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Philippe Altherr <philippe.altherr@gmail.com>
Cc: Daniel Shahaf <d.s@daniel.shahaf.name>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: ERR_RETURN doc
Date: Sat, 10 Dec 2022 17:24:00 -0800	[thread overview]
Message-ID: <CAH+w=7YP=sfYRAqPyLp5gYonmF7-zNVq4CvybVSMn308WC2+Cg@mail.gmail.com> (raw)
In-Reply-To: <CAGdYchtrcF3D14=kTx1LuLh4trJ8D7VkhC62AdquxLRm1_F-Bw@mail.gmail.com>

On Sat, Dec 10, 2022 at 6:12 AM Philippe Altherr
<philippe.altherr@gmail.com> wrote:
>
> POSIX' "set -e" specification. That specification is quite a bit longer. Should Zsh's specification repeat all of that? Or should it link to it?

The zsh manual is not rigorously enough written to be treated as a
"specification" and would become even less readable than Ray already
accuses it of being if we tried.  I'd prefer to give a summary and
then reference the POSIX spec for details (but not via URL-link to it;
URLs tend to get stale).

Aside, Martijn Dekker raised a related question back in workers/43874
-- according to the POSIX chapter on Utilities
(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_01)
there are a bunch of circumstances where a non-interactive shell is
required to exit "as if the exit builtin were called".  With ERR_EXIT,
interactive shells are also required to exit in those circumstances.
I'm pretty sure, though haven't re-tested, that zsh does not in fact
exit in some of those (such as a redirection error with a special
builtin) and in some of the cases where it does exit, it does not run
the SIGEXIT trap as implied by "as if the exit builtin" (that being
the actual reason for Martijn's message).

And yes, I used a URL that might become stale, in this message.
Nobody is ever going to need or to be able to go through the archives
and fix that, whereas documentation would be expected to be kept up to
date, a burden I don't wish to impose.


  reply	other threads:[~2022-12-11  1:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f29162cd-28d1-85ed-6a3c-9bec1fb2e13a@eastlink.ca>
     [not found] ` <CAA-Ti-hhbwZD3-aeMvy_tm5f7SKHw7XN4muJn8ymez1q7rAE_A@mail.gmail.com>
     [not found]   ` <CAN=4vMpCUNgKYgSR+4rmREpA25v_sLHYcS4nfTk8EQ_0Cg5yyw@mail.gmail.com>
     [not found]     ` <5d0c4e22-80b0-2fd2-ee75-6902da52d121@eastlink.ca>
     [not found]       ` <CAH+w=7aeERdOcpPzTmKVQFK7HLduh2s1J9VFzumCh6W0SJFqpg@mail.gmail.com>
     [not found]         ` <57e8e248-bb1a-663a-8557-e3fc13f671d4@eastlink.ca>
     [not found]           ` <CAH+w=7aW9meLuEKSGsKiZMXoAd7KBc9fgakXZnB_t2iphq=BPQ@mail.gmail.com>
     [not found]             ` <e35c2f14-abda-93d7-bf2c-6823d6d3215d@eastlink.ca>
     [not found]               ` <CAN=4vMrZzxYVjc63DwU=Scks39FhzmK+E57XerOwusmd64QOjw@mail.gmail.com>
     [not found]                 ` <c2f348d1-8982-d4a4-2c78-a0dd67319b8c@eastlink.ca>
     [not found]                   ` <CAGdYchv9T6ByD7meADqWzdJwAF2SG2YXhasT0=+AQvV+08ZRrA@mail.gmail.com>
2022-12-01 16:30                     ` Bart Schaefer
2022-12-01 19:30                       ` Philippe Altherr
2022-12-01 20:05                         ` Bart Schaefer
2022-12-01 22:52                           ` Philippe Altherr
2022-12-10 11:33                         ` Daniel Shahaf
2022-12-10 14:06                           ` Philippe Altherr
2022-12-11  1:24                             ` Bart Schaefer [this message]
2022-12-12 23:35                               ` Philippe Altherr
2022-12-05 23:48     ` one time in 20 error Oliver Kiddle
2022-12-06  0:13       ` Bart Schaefer
2022-12-06 13:21       ` Roman Perepelitsa
2022-12-10  1:04         ` Oliver Kiddle
2022-12-10  9:23           ` Roman Perepelitsa
2022-12-15  1:32           ` Oliver Kiddle

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='CAH+w=7YP=sfYRAqPyLp5gYonmF7-zNVq4CvybVSMn308WC2+Cg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=philippe.altherr@gmail.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).