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,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2491 invoked from network); 28 Mar 2023 16:25:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Mar 2023 16:25:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1680020719; b=RaLMO9mCLdBlp9hALt+43fm0VSQ9wDd98CH0i35NGY5hawB8XyEKmgfGEVNU9C+0IfaiueinTJ pS8hdEmWxxYDa3kxEZn3gQoHmJjdq6eeeFrdfqKwlpH8F9BVX2n0AJ4eydI5uvEMRyOpiVrGOV 0wXQK5umi8zo5yO5fb8Bjb/6Yt0CHKqLnAhumj2KYyX89qa/f6XW33K+WYDi4I6ncK01JO9Sud 6h1zfnzySLXlhwnkuhfCkw1QWwlyd7tlCqA6Ct3gxkBei7SvY2HH+nezKqetA2k+LvgXuwvHGF +vH4lA4V7RZQGhg1jnCsnXXC6Jh4lLvVHm6UXXt7JR9KEA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (02b.relay.hey.com) smtp.remote-ip=204.62.114.229; dkim=pass header.d=hey.com header.s=heymail header.a=rsa-sha256; dmarc=pass header.from=hey.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1680020719; bh=q23W9v5swyL87ScNhmePaq6XCWx6qWYrNcqhd/qsUEQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: Message-ID:To:From:Date:DKIM-Signature:DKIM-Signature; b=m8z1V/E1cC+0wPc38m+iQY+pfDvytWdcWvDL83XMApN8zhU18IzyUw+VrdMdGAc3MvuCR14V3b +xNZn/b+fL29kjDLHzub55m/8GKx2DzpoSR/uKNk3sgJ3zku5bx64nL92WQbyOiJLHQkLpJ7sa 1rcZPoE5rIhpa2K0E3SJ8M1HdmHS76gvvbYJe4hw01ioJHQWvebpHGKYf8gWKRis8pecxF99uI 4U5LZDgRmAWljMiyzguDfgBptRc0yJM1+ALmL9yhuEBayNmy20DfGLH/2+7JJZ9lhtoNds+0Lt 34+Lli+tGrNchlolGhisMJ5cxR3QsU6mjM1qLTZBJwAIyw==; 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: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:In-Reply-To:References; bh=VcxUr/YywQTtRbYW0rsutlMlHCokPGcUqDFpVCzw4Cc=; b=nTngV8Q1KYnoFUCGcP7MYhaI6w aUmX2xdYGebLDZdP09m1WEccdNbcp7BS+nNhXKPsLG7NV3/2IByz3Yqofa5vO/4Gfyygua2yZmk4l g9wXRbrRKofyezK7lR4IXYllEOKUqoZJnHQ5/zrS2ch0zWJRKiIxEjQs2FqTLCTFlVtOvSdM0/0Fw 7N+CC+jrfj5aJ8SBFnEFRepgekujZ/YbSILYm5rU7x5NmGNFVQmrOR3gSLF1d0/NOoykawFfO9G3f R1Ab1gPjV+Xqf5wXizMWWRcFXIHVQEMdDsgY0D/0rEtb7bx9Y+bze+2gxrGWnzLVtDU1sO7mw7Ayn eA8K9QKQ==; Received: by zero.zsh.org with local id 1phC8M-000DiD-9B; Tue, 28 Mar 2023 16:25:18 +0000 Authentication-Results: zsh.org; iprev=pass (02b.relay.hey.com) smtp.remote-ip=204.62.114.229; dkim=pass header.d=hey.com header.s=heymail header.a=rsa-sha256; dmarc=pass header.from=hey.com; arc=none Received: from 02b.relay.hey.com ([204.62.114.229]:57535) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1phC7d-000CyY-7p; Tue, 28 Mar 2023 16:24:34 +0000 Received: from hey.com (bigip-vip.rw-ash-int.37signals.com [10.20.0.24]) by 02.relay.hey.com (Postfix) with ESMTP id D9EE11BFF97 for ; Tue, 28 Mar 2023 16:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hey.com; s=heymail; t=1680020671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VcxUr/YywQTtRbYW0rsutlMlHCokPGcUqDFpVCzw4Cc=; b=K6IDlyacGipKz3j8KvCcQ650oJENoVAapsrFesR1rfrvxNk1+g4nqOtgMmGMVC66lcfP7s vcjH7JAoe7WMR/EKxtZ8wBRhIx8lEEDAUUt1Ut4J4H9eMLGctsrUDsWPd99ExcS7A2qG5X a5z+INPbXJB6qN+2LWootyzBf6ui5RXR0pXG79qKgCdu33hVi18IWJU7jUrmcOG4asmIyM aMCIi1kVVFcIJZJri/LqPQRjbRRty12PBVvX/FXJ4MwyQy0jvpb889ZjHebF3o+2p6TEqG 7RsHkVv2u8a1m2XjsUqvQi8WTdheKJoZSI8h8yXSYdqWm8VeeJcRz9Wyx1pxJg== Date: Tue, 28 Mar 2023 11:24:31 -0500 From: Eric Nielsen To: "zsh-users@zsh.org" Message-ID: Subject: Assign to outer parameter from function called by zargs Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_642314bf50950_413a1db097272"; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Seq: 28991 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: ----==_mimepart_642314bf50950_413a1db097272 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi. I'm trying to assign to a parameter set by an outer function from a function called by zargs. Accessing instead of assigning works: access_outer() { =C2=A0 print ${outer}${1} } () { =C2=A0 autoload -Uz zargs =C2=A0 local outer=3Da =C2=A0 zargs -n 1 -P 0 -- b c -- access_outer } results in: ab ac as expected. But assigning does not work as I was expecting: assign_outer() { =C2=A0 outer=3D${outer}${1} } () { =C2=A0 autoload -Uz zargs =C2=A0 local outer=3Da =C2=A0 zargs -n 1 -P 0 -- b c -- assign_outer =C2=A0 print ${outer} } results in: a and I was expecting to get: abc (or acb, I don't care about the order since I'm using -P 0 and I expect paralellism could interfere with the order) What am I missing? -- Sent with HEY ----==_mimepart_642314bf50950_413a1db097272 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi. I'm trying to assign to a parameter set by an outer function f= rom a function called by zargs.

Accessing instead of assigning wor= ks:

access_outer() {
=C2=A0 print ${outer}${1}
}
() {
= =C2=A0 autoload -Uz zargs
=C2=A0 local outer=3Da
=C2=A0 zargs -n 1 = -P 0 -- b c -- access_outer
}

results in:
ab
ac
as exp= ected.

But assigning does not work as I was expecting:

assi= gn_outer() {
=C2=A0 outer=3D${outer}${1}
}
() {
=C2=A0 autolo= ad -Uz zargs
=C2=A0 local outer=3Da
=C2=A0 zargs -n 1 -P 0 -- b c -= - assign_outer
=C2=A0 print ${outer}
}

results in:
a
a= nd I was expecting to get:
abc
(or acb, I don't care about the orde= r since I'm using -P 0 and I expect paralellism could interfere with the = order)

What am I missing?

--
Sent with HEY
----==_mimepart_642314bf50950_413a1db097272--