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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30089 invoked from network); 13 Oct 2021 09:10:57 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Oct 2021 09:10:57 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1634116257; b=ExDkSXIWEOD3dDISvt8FXrsrzvHyqSrtXkVuikeRmwF61AlSjDSrPxyi624g1xypW0A6vLKdt4 Hot58VDjZdr0Jtukj8bWcznDsudG6kP4ZfDacxWK5df5CoL2R46uFOxRzb7p/8oE7nkb4SVdCR MCj2ixfMviedxo30hqSuh/TOEsnQa/6eoQeo/IJ8vsf7EPfjeAAt1nHJsZjDDaGQUgRej9AUfu tVB/Z9pswUzDijvl7u8RqwlKuezE6TgNYpnzv7cmY42Tf9PKsxhHigIoxIU9yBXeShgMPz1Ac4 aw7C8oIWttAl1b/vhWqAjTIZrh4rSvMzXK6MIiXTU5LlPg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; 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=1634116257; bh=keB8pJdCM4f7vb8oF7siJhmLT2pX/fLLFW3KX4BuBbY=; 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=qnrq26vnobnDLugPsRnBL+zdigb3ubWfPjAKz7Kx9H33ROCwybvfzy/GhQycrBEc39TyAJpfUc q2KhunTpGHakJNeLGqxy7jazLkBBEDdZ9aNmnwMe/7nBwIgCaCUiI3g0Zk0z7fgHbuJVz8nKLA UyS/gL+57Dsayob07pwpMKo0iCPMFsbQs0DEPiYvDlHVk0QSHmSx51G5feH7hP/yrYItj66qBC +IutWMffJG1O1CSPnO5Q4HMR7gtRPN/QzXDd3A2xRfWGRBdxGSguYMPL90EAnIuMmAlAhgF/F9 q8Yi3eXlpMCfIQ6MVv7gEOmNOY2ETDV6u0xRkLM0/b4YLw==; 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=5TikhnggQLN6ZYhNqOyLkADap15jJJfqdKuMAY2YxlA=; b=pa8WXFbQ/1b/VgmTYeTZvzQe0W 6m9kuoRfPbcMz01SVMRGOh4QxsSxip5lMyelmB0vjqSahrkW/uTF14D2jt97o9ChUdthbsz6HWV5n 9tktVCmkwlX1NodvgokHnulSxHJFZSLzU4T5gTRmAfFbVlFtyu47DFPPpGieOE+gHwMF0eBLQtkJP zmyJIk3w+SR8xjYxvf+g70tQIBnAx8+EgE8WVJwwKfVrmLs8N7hmzGMcbN1pF9ZgWtrvEGsodLK1G aoPnnz2FNw2GTBU5KD6sTZSp3L+iPKdmLp5J9f6H0lb5hPIWqmMm62xpD5XhfNyDuTee0MqNhKEre iAuKslvQ==; Received: from authenticated user by zero.zsh.org with local id 1maaHn-000KyG-8z; Wed, 13 Oct 2021 09:10:55 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:44854) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1maaHU-000Kgz-C7; Wed, 13 Oct 2021 09:10:37 +0000 Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net) by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1maaHU-0005Gu-5U for zsh-workers@zsh.org; Wed, 13 Oct 2021 11:10:36 +0200 Received: from oxbe8.tb.ukmail.iss.as9143.net ([172.25.160.139]) by smtp1.tb.ukmail.iss.as9143.net with ESMTP id aaHUmJTtchdxkaaHUmBXH5; Wed, 13 Oct 2021 11:10:36 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.139 X-CNFS-Analysis: v=2.4 cv=Ru2mkAqK c=1 sm=1 tr=0 ts=6166a28c cx=a_exe a=pgSR3NrKiwmx/6vnWRL19w==:117 a=JHxdR_ueUdoA:10 a=IkcTkHD0fZMA:10 a=pfAyaZmUD_0A:10 a=NLZqzBF-AAAA:8 a=84lgCiNZst0Gk_OoHRAA:9 a=QEXdDO2ut3YA:10 a=wW_WBVUImv98JQXhvVPZ: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=1634116236; bh=keB8pJdCM4f7vb8oF7siJhmLT2pX/fLLFW3KX4BuBbY=; h=Date:From:To:In-Reply-To:References:Subject; b=0omqskwUjrkWHYoTkrHgSj0vFXShLYFtrDn8lloOH79GF9grv0CIPAKz9YeW6YI3S 8V3levB6vZmalSlfdJE9PsIVGnpLeNHMsYpV8oYiB9Pr9kbqH3EhlKLXKBVy+uVz/B CpoqdiSBmJGvItli6z0WRQd3nhz3Fh2i+2Sdw5dR6gFagAciExKgyCAe/oWPTm5Jq4 f7SF0x1QkOYOrDT03/HrXhYfAwpuoacrpfyOGBYnKY8h6drnO9lIKKTZUJQyLU5EsP XKzumkTDBYH8tCDphsYYGz8VF7C4vBEhUPeqEM7KeGG/4XRQSvn3ciN+IMlxd6+hXo jXn+AN2IDfXFg== Date: Wed, 13 Oct 2021 10:10:36 +0100 (BST) From: Peter Stephenson To: zsh-workers@zsh.org Message-ID: <486040678.536915.1634116236077@mail2.virginmedia.com> In-Reply-To: <6uviEgEHuYei0UyfGfR_mqJvrNcXyJ5zfUwrQViRtmWwGeZwRR1C26lsUK9_D-V_GzCg5cG2gQ2IwHxScwLySDcy71rAa2RMpK5XF8BvtkE=@pm.me> References: <78LG0jAMo3FtN941LSwAK1kIhfcF6dszDg8-71F1TxHB3vKubQBIIAWx8yujorTI1mEI8iq4Rsahakh7IfgcNXdq2KMviv805m0imzBh5Sk=@pm.me> <917132892.507659.1634027485386@mail2.virginmedia.com> <6uviEgEHuYei0UyfGfR_mqJvrNcXyJ5zfUwrQViRtmWwGeZwRR1C26lsUK9_D-V_GzCg5cG2gQ2IwHxScwLySDcy71rAa2RMpK5XF8BvtkE=@pm.me> Subject: Re: Question on unintuitive behaviour for function execution and parameter assignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev72 X-Originating-IP: 165.225.81.18 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfFiJBjfbjnvXmmYs0w7qFRCLFmMSTi4E9zfRDA9u9iX8qIs4Th3Foq2fTLPJyTUKsvr9CQqCA3jUM3Njgi2hYit+nubx913v0rNpIjN/520Bfxue7akm YBzCTgiL1OKqDZyEzrfQ2KAga2AxQHQOKFaWUYLPLnLHsOoP1qOVjKebceAvu3NUeb2KzBi4i0+ibpELwQyv0xLBxbdiZ/tYEngKByxCSJaSgqxXsWH1nXn+ X-Seq: 49481 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 13 October 2021 at 09:42 Jett Husher wrote: > On Tuesday, October 12th, 2021 at 10:31, Peter Stephenson wrote: > > This is covered by the POSIX_BUILTINS option. Generally, the POSIX_* options are > > > > the place to look for this sort of think --- granted that can be a bit of hunt. > > I wouldn't even think to look at POSIX_* variables because POSIX-2017 > explicitly tells that it's unspecified "Whether or not the variable assignments persist after > the completion of the function", so, naturally, I though that this behaviour was compliant. It's always worth (everyone) bearing in mind that zsh is not a POSIX shell by default. In fact, it's not *completely* POSIX even in sh emulation, as this has been gradually retrofitted, and not everything can be done within the current constraints. cheers pws