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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20645 invoked from network); 11 Dec 2022 01:24:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Dec 2022 01:24:50 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1670721890; b=INXKBBUh5QQR/jjL4U3oirWZA4Gh2dFUGAW+uzBi4y4Ff86fl2lwQt2qd7FNRo2h2Eyl+e6/sA x/FKiUft+aiCgNIXNi6nBjR0rnjVaJFiuSBanTIjK4xrZZxX5aSLlbOJ/xmyHUUeu6Rgu6t19k NPtN8izsbU9jBOj/4UaZ/q+BTq8bxVnsy1nPAZYmjN9rMy/9yGvEwYa6oM5J4O/vsj7zaLFlGp 89UhC/4kIfD3cO65ySuzEWd9wZ3GYa6NDSGLAVAQDT34cHJC92Ry4YQ8bc4CQ6hbWzje48N2I0 eNGJK8m2MPX36C2DYk24h/He1xEX0kSnecqPdA147nHJ0Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f41.google.com) smtp.remote-ip=209.85.218.41; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1670721890; bh=8KsUeEAvtKkuY5+km4LXYFRoBYfOtoRP96MuZZ2B/B4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=kV9DSEazv2NSneMywp841/DW99oF2xCszJ856e8QILEmDeSJGWybQEkWhW01IZ5ULs4XJfn/+0 /+ZNDLSXir9qknRtBEd0tFs5Oyd6JLzPP4XJL6LyyHK7dLUXnXEywWyWoJ6Zt4DfRhuyEwBEbo ySnA0d1120X3l/2Cdr6pSo4kU8U42kncLwA1gfoENk6LA10Bkr8GYyTeYoMncMshF7NyQcA1+Z 52VflEYfU6U+++bMDfpg5zBebc90KFoaZfUU5Sus2yAn1QcC7sJDarCff8atLqMV0ulT3g5eu9 pqsrWpni9Zcs7Ys/ojcdBgjwbNbdJcnSo6mtbw3jB6d/zw==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=4ffKqbrtpD8UPMIGRrZoYYjcmwFflBBn8Gc780kP/Wg=; b=FLHcziQKnlVRYLWHRHH3PMbueH c+EPNdVhVMJXy/qMZcllIB9AEHsyOgfj8yrYBWVKoCZnRUZsEelHvA4ZkV1Iwyf8TV5jXrbbfp0Ql hH/cMpb5io9f0h+v7f4mtEmE7yhgVX7C/3mLE6S0WNx8e9Qi1QelZUmHSWTF/0IhIgQnfL1GTw5+o VauG4waaXQy5JNg8wHSQu1VkUCT8QmDQ14LspOO97KuEh8tiD9P3Zz+8OVLq7xQyxF70pR+VS9+dM 6SKNejfiOj1CRWiT01DgbvUW6xuAeUjLPCdZghwHUz0Cp5fOjVa4KQNB7QqsIOpD/MPUfSvIt81y9 2gIBUWhw==; Received: by zero.zsh.org with local id 1p4B5E-000O6b-P6; Sun, 11 Dec 2022 01:24:49 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f41.google.com) smtp.remote-ip=209.85.218.41; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f41.google.com ([209.85.218.41]:34714) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1p4B4e-000NnC-3Y; Sun, 11 Dec 2022 01:24:13 +0000 Received: by mail-ej1-f41.google.com with SMTP id t17so19953673eju.1 for ; Sat, 10 Dec 2022 17:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4ffKqbrtpD8UPMIGRrZoYYjcmwFflBBn8Gc780kP/Wg=; b=yToXgq9Hs5PrV8fwDCE+VK8pIJ6aD+Y0PGUtUFz9RWSLR3dAFZfqNS5rFT5S6GPHoV vH2JDtjVkTBgOouwx3fou1sJejziQ4cGSi0Qa+Ok5iqedE+kfaYbDZ0XdXivn2OnE0gR bckhdVCakSvsaMoq1l8P/N9LUd2lm97Cb8fQ2JS905SkPv38F6t7sLhB0KLJ1HjUy8Z1 t28kuCTEPiQCDnw0CBYUTQPCbfUHbtzi3zf8OfKYOaectd1qeBW3cJZ7Po3RbYC/hLG/ 2IaL6zJxdPvyEeK8wc0WdvDT/kK2zG85u+rk8C7QV3X/3SwGbtQ/hUtHqiUl8Hm5nOUx llRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4ffKqbrtpD8UPMIGRrZoYYjcmwFflBBn8Gc780kP/Wg=; b=6vpJjBQsWSjfFVIeCoaWbIHk7jEc3kBReSH9LSoioEXt9lQP8eYg2DUZwZYd6pRn4v p852idUFhKczjPFVz4G6l4iwyB9NrjU8ncvhDd08nsACzMMBLzH2PXQ1s9XOno7yGqbL H4VO+GTLIsFmzzaUKULge8AVGuLcYTfXuYPGxGdey02MvTsc2gyZhCBHTcmb2VHbPcXN N77tvYQzamFADRunyFAKndc/xpJJEQLm6lLWLDBFxhMFaUTjbAWQSQKQcjo16+hRrL9/ vhR77S+p9CfkvP2a+9H9ZaUmapIzQZgvgy6hKM/CZpVamwGvJSFLWy/9eyKc11grEoXl fxUg== X-Gm-Message-State: ANoB5pnhWu4fVdxDNq4NPyGW34dNZpqW3I20zLt0FSv38+tBhNA0PH2T NZyNGE2UYVuebxSqqATnu0rcIfOHhI5G00LjtxGu7Lrp9PimQISv X-Google-Smtp-Source: AA0mqf4cd5F8djdUgVnnJeSW5AeckPY+HkvRpKLy7gd5zrNPGyCM0RAdU5r6K/fP6jMQbjOC+1DSMoOH9/C9Cb9eHVQ= X-Received: by 2002:a17:906:50a:b0:7c0:b995:8f8b with SMTP id j10-20020a170906050a00b007c0b9958f8bmr25258039eja.55.1670721851260; Sat, 10 Dec 2022 17:24:11 -0800 (PST) MIME-Version: 1.0 References: <5d0c4e22-80b0-2fd2-ee75-6902da52d121@eastlink.ca> <57e8e248-bb1a-663a-8557-e3fc13f671d4@eastlink.ca> <20221210113355.GW27622@tarpaulin.shahaf.local2> In-Reply-To: From: Bart Schaefer Date: Sat, 10 Dec 2022 17:24:00 -0800 Message-ID: Subject: Re: ERR_RETURN doc To: Philippe Altherr Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 51182 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 Sat, Dec 10, 2022 at 6:12 AM Philippe Altherr 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.