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,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18026 invoked from network); 1 Dec 2022 22:53:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Dec 2022 22:53:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1669935238; b=snYaEfOyGmqpoBGQHSEjZdBg0MxzKJJStZkQ6TzYy/JTwpfVGt9mrCkzyyB/WlInzLioTHmdmG e0nY4fW3QdlZNFm48jQZO246ufk4EwhR+3+7LWor0tVJ2N+QUZ1At74nu2qUtTN4fM4JwIX0sY ZjUDLJvDDxhmIt19Y2IpCNqzCAt+VQoFNw78iQH15iMuIFtswaQ23W1YEtmZ3gArhZwZ5dm2fG ydzt46g+jQj1MREB9Nw70to2P3OtblfXHljhFWytWgyVIgv5dUM+Ingbw7rRQvMsGJ0pphXLPp 4pEJ5/MtiscaMThY1HtDIUEwlstYCwOvTfSdmRiTiEXbKQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vk1-f179.google.com) smtp.remote-ip=209.85.221.179; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1669935238; bh=a3uXEOsBWgjk3qk3IXjGHMu/NCT+97DfojnPzP8Pihg=; 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=CpT2dFQdmi+pa42sqiS3moQ6bHhmJPIfX16vOvdJ05Ln/bL+Z9HXX0yFaUHquivcPZZ+FZmzTP 5WeGfvVYQN5HZdvx+Fi0PXfJ+v90BWR4b0WS7NVntS/uooFNxJlLFpRBMZsq3PWVGUYz0pah/A qMzEG4aTmv5MXNXynzdz0B4R88l+nTE41M+WpZ1fR+UfmlN9rvIwGpqxBn1kQGOh7jM20W2dzt HytzXsdGN2Y9NaBVKEFHVXaKUSVuoABktqrAwVBchdVC1GllsiioggK8zwowjqRFbLDqYqKe7J zVM+UFy26snDiaBbsuKTo0UmR6gvbnbWFWmdpg/uddVS5g==; 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=27LWPSw9A34XlC+NcRVmL3s8R7DSBA/zSDyA6+jYh/o=; b=mtWWa728a4Lu7FyAHAvRKm+5tV ogSnj6EasCdT5hjw+F2vRwI3m+ek+D10yY9mp30sZt3KozlWp7dthitn3GKPjZUD7S+iJNMtWoZcf kGWK1atrNhYCx24CXLlB6oGXRjYcmJt0J9V6OmB2LxqX8mLVUt3fiPjKPDFfrRt0ZPj7iBUWIyvKI 0y7nrvSzuABf5ixbsnOel8llcw5IqlkjPE2yWtOcYxC/gwx2rc7EVBG33ZTSsbWHJuCLUQB9/EGv0 UrM5pOT1Gy8Q4epK9vOU1lTSf13QAyqfyRxAhokSAAuUrc+wXYiz+y8pDz5T8VGK77NDdhFfn2L57 k1gyq/Cw==; Received: by zero.zsh.org with local id 1p0sRJ-000Ge4-La; Thu, 01 Dec 2022 22:53:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vk1-f179.google.com) smtp.remote-ip=209.85.221.179; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-vk1-f179.google.com ([209.85.221.179]:39568) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1p0sQ2-000GIb-2M; Thu, 01 Dec 2022 22:52:39 +0000 Received: by mail-vk1-f179.google.com with SMTP id 6so1553063vkk.6 for ; Thu, 01 Dec 2022 14:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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=27LWPSw9A34XlC+NcRVmL3s8R7DSBA/zSDyA6+jYh/o=; b=WHueOcp65zF56n8/KNZ4CryTiMWaL5H1gFLKW3g/0uTtaegWGU3JjIUD7UkYCjobln hIipWe3goo4f82viowgrz2XmFzkTVo/R84AEiFuO/9CaTEulUym3GGoJCADwCcT2uUge /GdHwhcIuUlmHeEau0sHCmx1Kz7ACUQmr8lsgVnMDzVksES2VdPqPK6OdE15kRC3DaGf cadPMQvmGHWdiwlv+Cgz3Z/wPn/YUHQraJ+8GlSvqi6Qr1u5VW+OiaJhbP7Yq8v8BbKu qXZZk1oktUdZTm5xtu+moJAbBCeFhmLxDWjQqfStnlrc4Cbh+cwk2mTV4O4NEhXiuHB+ SFlg== 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=27LWPSw9A34XlC+NcRVmL3s8R7DSBA/zSDyA6+jYh/o=; b=q/gvtG4ywCtirReU6XlT0twycNlmJdyZCGOpH/PQOrafzS9Fc2lvEGLznMk+YyCIXq XxmHoZjtj1PUB5hCe0vF/IfMNG+7N7qeRYI6nAYZYxLunXzyowhNziwgqFoY/vBLzvaz NO5bxxkklXnHk8dMfMivjb76qPwR/BZ0qxgzQV/6MR5cg1DpS+pzaAcIthSg1B+8tN/0 w2eJVJRENEy/lcVaTGcqH2YmWa3Lp/igx9703/sWtsIyicGQdc1X3sbFshWlST07gXxJ XAua/fLKTAP5zZfGWXkrug8tvvUVNIbCfRadupYptC/WcutXUNaBHBPHzUaHI968UfUD eSTQ== X-Gm-Message-State: ANoB5pnl7wXa+fS/JLGNLRl3RLyvnwswK3Xk165OVf3qCB6JXOGpmlMj dI/M0lEsrTr9aPhVVjhekZzBY2EyMyO7HcR55ftWEc6LxAM= X-Google-Smtp-Source: AA0mqf5YX1v5YRFcud/Qe4MEllb4pkjAUUB1vUElfqYETx61nqZRtDKAJMXK2/JQS+4JrqzVY3xHVeDNQCHZHo0lN6s= X-Received: by 2002:a1f:5042:0:b0:3bc:e09a:3903 with SMTP id e63-20020a1f5042000000b003bce09a3903mr12492592vkb.23.1669935156718; Thu, 01 Dec 2022 14:52:36 -0800 (PST) MIME-Version: 1.0 References: <5d0c4e22-80b0-2fd2-ee75-6902da52d121@eastlink.ca> <57e8e248-bb1a-663a-8557-e3fc13f671d4@eastlink.ca> In-Reply-To: From: Philippe Altherr Date: Thu, 1 Dec 2022 23:52:25 +0100 Message-ID: Subject: Re: ERR_RETURN doc To: Bart Schaefer Cc: Zsh hackers list Content-Type: multipart/alternative; boundary="000000000000d0724905eecc133b" X-Seq: 51092 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: --000000000000d0724905eecc133b Content-Type: text/plain; charset="UTF-8" The following script prints "done 1" set -e > false && true > echo done $? If a statement followed by an always-block always behaves as if the always-block wasn't there, then the following script should print the same (after "ALWAYS") set -e > { false && true } always { echo ALWAYS } > echo done $? The current Zsh only prints "ALWAYS", while the patched one prints "ALWAYS" followed by "done 1". So I guess that even the always patch can be qualified as a bug fix. Philippe On Thu, Dec 1, 2022 at 9:05 PM Bart Schaefer wrote: > On Thu, Dec 1, 2022 at 11:30 AM Philippe Altherr > wrote: > > > > The patch about the always statement makes it behave like compound > statements. > > A statement followed by an always-block should always behave as if the > always-block wasn't there, except in the TRY_BLOCK_ERROR cases > mentioned in the description of "always". I suppose your patches > should be tested against that. > --000000000000d0724905eecc133b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The following script prints "done 1"

set -e
false &&= amp; true
echo done $?

If a statement fo= llowed by an always-block always behaves as if the always-block wasn't = there, then the following script should print the same (after "ALWAYS&= quot;)

set -e
{ false && true } always { echo ALWAYS }
ec= ho done $?

The current Zsh only print= s "ALWAYS", while the patched one prints "ALWAYS" follo= wed by "done 1". So I guess that even the always patch can be qua= lified=C2=A0as a bug fix.

Philippe

<= /div>

On Thu, Dec 1, 2022 at 9:05 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Dec 1, 2022 at 11:= 30 AM Philippe Altherr
<philipp= e.altherr@gmail.com> wrote:
>
> The patch about the always statement makes it behave like compound sta= tements.

A statement followed by an always-block should always behave as if the
always-block wasn't there, except in the TRY_BLOCK_ERROR cases
mentioned in the description of "always".=C2=A0 I suppose your pa= tches
should be tested against that.
--000000000000d0724905eecc133b--