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=-6.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12537 invoked from network); 20 Oct 2022 19:16:15 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2022 19:16:15 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666293375; b=KLrlkF2Og/I4PX+U25yY17BENxoqFYQ/pPTbPirJyYT3Vh5Zae0j/ApOtMiUx7ktsb2vD2kyr8 7IvsBRfnBQnNb+OjobBoWaNGVqAWNjYYNorvuy4aIwCtmldk5YilSveiHwfD8RqG6Mz3jwmyJX ktfTNZWUHIx3B3RKzLnVJOg0N1Fr6uQAUcOhovqmeeYBtE5Q27rhKINBpstqMkuK3/U9ZJvBuM I9yMtAKfbmmJkrI4zJUF8UICH389/UhVSf8K0ap7eCOHQ05u54xsYsPqVx4W2+3y1LTCnqp1NF fXBA4B9rFhK2Fs6mZJeqCUqCWaRiYCrxZp69iIavFMk5UQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1666293375; bh=Nk7b3eITaU3j0k5enrTVb90xA2sEkKkFvu8OaGNFSe0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=A7OS1jj52eNLbW7+5pTNICuLiUogfFRjNo1WOuC3ahtfpDk+y79NTVeirZuhkeasv7TJLagD5F telvejebpbpvVJq2Rt5cuEgu8kKjQsZCzo7yFEqQo2002vagsNO7e564qsRQXFFZQht9f+MSM5 d0GV8AGZlnhuit8GiO591TXe7uhXHoPcJTS7SQay/Vd0jDLrnIwJNX6wkoatQI5C6pGBblvKPf paYOAhvJDZInaulCw6lCRum1c5NKXroMRlwo26HsXVv4L+5I1s1+3QsPm2TFzYI1Hk9hPgqJGv +jq5FBoyjViXn7msUFr616ar8CC63Ukg0jJGWDUwQqWdyA==; 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:In-reply-to:From:References:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Nk7b3eITaU3j0k5enrTVb90xA2sEkKkFvu8OaGNFSe0=; b=VWeD1e5Pjtm/xh0GQabr4I+QBK 4Bb6r3VGCJYu5rA+rMJMe1hfzoShyIdC8Eaaz6VHi7JEI3Bvg+kLcu/8Sj9g+hmZ9g9cJsEb8Msef XWLzc099hgSvCVrMh7epPkNFWD2xIlPsoJClQ+pt8hEmf/coOf6SS28Ur8asQ0a6WCF7NVZmUKBQ8 4me+XoVRexudKMmiLGFVFn8MLG2ycLdp/c+0H7qnrPrSdK0Fz2vYsJ/7KxLuHZ38Bhp6Mjoj7ixKo BWEydusgTwxO185YpRjrTgeNMP9VA2f5dfOCHWU4xlhPGM24VKq9krOwMJ1TYkMmLa2Zvy0HK6S86 APkTWIFQ==; Received: by zero.zsh.org with local id 1olb1a-000EpT-HM; Thu, 20 Oct 2022 19:16:14 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:35005) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1olb10-000E96-Qm; Thu, 20 Oct 2022 19:15:39 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RK2009CPCEM0C00@mta02.eastlink.ca> for zsh-users@zsh.org; Thu, 20 Oct 2022 16:15:37 -0300 (ADT) Received: from [192.168.0.2] ([24.207.18.108]) by Eastlink with ESMTPSA id lb0zomyW6lmAklb0zoufCQ; Thu, 20 Oct 2022 16:15:37 -0300 X-Authority-Analysis: v=2.4 cv=Y/M9DjSN c=1 sm=1 tr=0 ts=63519e59 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=61OCI9sxL3NKxxXfl4wA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeliedgudefgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeeihfefvdffleegjeefjeehjeevfffhffdufeeuudefvefftdetudeihfevveeifeenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrddvngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepuddprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Thu, 20 Oct 2022 12:15:37 -0700 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: var=$( typeset "$1" ) ... not within a function. Content-language: en-US To: zsh-users@zsh.org References: <5f18c162-e111-21ba-3ebe-ece09a477ecd@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit X-Seq: 28240 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: On 2022-10-20 11:44, Roman Perepelitsa wrote: > USER` behaves differently depending on whether typeset_silent is set > or not. You tested `typeset USER` in an environment where this option > is set and then in another environment where it's unset, and got > different results. file 'test': function ii () { setopt typeset_silent var=$(typeset USER) print set in function $var unsetopt typeset_silent var=$(typeset USER) print unset in function $var } setopt typeset_silent var=$(typeset USER) print set in script $var unsetopt typeset_silent var=$(typeset USER) print unset in script $var . test; ii set in script unset in script USER=root set in function unset in function ... confused.