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 28103 invoked from network); 7 Nov 2022 03:50:33 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Nov 2022 03:50:33 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1667793034; b=iqjMwyD9mzpDfO2tbJnMBs6unKSl/buzXPjNriF5DHm0p5sMLwFLHbj4v3j5l3AgU/KyNbID7r 0+3ulk7YH/6EUPb95U8byH4JGg2baBBksuZ/0GRHUZgDcmqFiYeYDZ1Fa1ryGOjOerGGT4EcvD kuCrxqLBlhyXxL4DYn4OKIxykrI6rViMFSoVFYgYu6cOIr6FiTJ74019LmI8ojR7N6F4Ssmjpo elYKPDXYTdk3H1KIRoS3d8WS8sf8BW9pULZQ6VRCoDHm4H2D+Fph1i30RUhX2tk6lwWmj43w+2 dJeWzwH8sRpX7+0JKaDDTNBauBo5xzY5raVYNQzQDtegcw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f53.google.com) smtp.remote-ip=209.85.218.53; 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=1667793034; bh=DtuME0WNxY4ZOgesp7uE3dBk52k2bIImz5aPAo3pqBc=; 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=C5gD2LcmF6JE9c+d+ObQgm++3SXfm41/AlBznA2ELkjFwTVITwr5YdloerMph/hJcaqGhyzTcL wME581o72m4YZlQ7UdXS4dcIaif+2W3Ut+9zfH1Xkmek2C3P3EeHYyhcx34fe9s0aPw4OmoyiG 2S43AuHFDC09Dj4YsBKCbzYzVhQRol2EhW6E02rapNgcc0BBPZ1fmELui4k4Jw9HQAqr8707/3 5POrmfKe6BBsnTN84UNC5dI4tbd40WlS/cnHwlrgnnRz/81Z3n29wX2mnntYmI5/iy2bHmd+BK us6UN1P5Eb4ayMdiPqvOPErwwEnXgLCTW3ivHx4vbCHoJw==; 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=JFOWzemYmD9IQTELPabcfmx3YQEJHlpMdP5RrAco0wE=; b=XbSwvsEWlHmJaeCYxEzhly8KYN yweVqL91L1tD5J/MxyU9N2iO3yOA6TQfGAFNP3caaMSfYLZqz/QJwQpnUMZerO+jKflTpfosfIki5 WjK4EZ50sdKVDb8Xbjon3mWrFFBiU6RJaCdxjTGKYGbpUY2AkWi83c0OGlatEAdfHqVor4Se+kPEp nobR1f1Oh/nnwKHuu/6lR787szVlOp00TkW+TifvCrZ9M4nYx+iVqrn+B9echD9ziMlUcCFfyezBp BxYkQA4fFX8cysn79Q1OaxFZ4tQVUqQIsplUE8pUOM8mtVnNjL3a2OVQroMsrsmVEE9TrEuXUfcVB BcU6ln+A==; Received: by zero.zsh.org with local id 1ort9c-000O0j-2X; Mon, 07 Nov 2022 03:50:32 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f53.google.com) smtp.remote-ip=209.85.218.53; 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-f53.google.com ([209.85.218.53]:42908) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ort9M-000NgW-Ci; Mon, 07 Nov 2022 03:50:17 +0000 Received: by mail-ej1-f53.google.com with SMTP id y14so26825463ejd.9 for ; Sun, 06 Nov 2022 19:50:16 -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=JFOWzemYmD9IQTELPabcfmx3YQEJHlpMdP5RrAco0wE=; b=BDXqbOCvCMUqWrwx/R1TAKfM4/9etODZT5T2FUNI2iW0PQfUo+/q1uPzKpPkKZXCc9 VjkzLy19pCuoFD/LC2A79ZL97qkf52ADtnS+rIMnR3bWE/YuDHyh94ysnH2wlOXksbem 4jXBKKthv7dkLV/jVPWavLTY5TDjsvEPVWcjrE6TqookD768rUR/1CUY7zYrmaB1XNS/ KH3/i3Z8sQOsN2p3dN7hEspO9tWd1ECB6LUjB/n7boclNRq+9k2R44Zbj+oneFzZ4IS/ r8OcMYPejZYdQr33mZQ43iKR5uIMbYE5aKsSKzIXQuXxZtSwPAU28iIlF5fusJ8oo+U6 A15Q== 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=JFOWzemYmD9IQTELPabcfmx3YQEJHlpMdP5RrAco0wE=; b=MmKIzXH911QiYACy/StSm9lFyUUMa+i379ZovsF7xHnTmRqiNrQtFfo9HmS9rXGTg/ vTuQxznG1Y37GiHOxTCp7blvcEnuHyanjvkmAOq9HavuzlHa5PnLnqDLNdvMsZV/OhGV d/oYRqOdGSelXUQKJ6kENTTTWBdpPgCeEhdz6dXEaZHFbfyms5YSMREK+kiJvVHQVb6q fZehwNm4YPBSDfe2tLU7dmpRKwX95SpO8s5M52YPs3km5FARX0sha+ziRQS7ZqQ4U9f5 7jR0vOD4L2KluzV0z+TqpQc3CHpO5jcbVQyVUzHUjart0CWtth+VgzySqCsU8DJhtF4k Lu7g== X-Gm-Message-State: ACrzQf3y7Am+YXU7TM8s5otq/u3QVZlvA2PTGQMdfsxm+WVyBBHC6Wfi GJHRXDxcbU1ZCb6gNp/WMzLOHfu8KAR7PX8JqmgeQQ== X-Google-Smtp-Source: AMsMyM6B0oV05l7/G1uBixdDi9iu0sf4Lwu/DACx3sU24nzpb8V5wtrefBLyg37O2+Hei2C0pxeXA4Z67vRK1D6N9Yg= X-Received: by 2002:a17:907:8d07:b0:7ad:cdf2:7b66 with SMTP id tc7-20020a1709078d0700b007adcdf27b66mr36786727ejc.699.1667793015824; Sun, 06 Nov 2022 19:50:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 6 Nov 2022 19:50:04 -0800 Message-ID: Subject: Re: Inconsistent behavior of ERR_EXIT with conditionals To: Philippe Altherr Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 50896 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 Sun, Nov 6, 2022 at 12:45 PM Bart Schaefer wrote: > > [...] I suspect this fix may be needed elsewhere ... there are a > bunch of similar cases for multi-line shell constructs in Src/loop.c Those are: for select while repeat if case Does anyone disagree that Philippe's examples demonstrate that "if" and "case" should get this treatment? More questionable are the looping constructs. I can't come up with a way to have the loop end in an error state without the whole shell ERREXITing before reaching the end of the loop body. The value of this_noerrexit matters at all, as far as I can tell, only to suppress the false-condition that ends a "while" loop, and is meaningless in for/select/repeat?