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.6 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 8144 invoked from network); 16 Dec 2022 21:34:08 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2022 21:34:08 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671226448; b=sIPavf7naWL1h2HogByBYJOTLLv1cmHq8PKoJxF+Y/kNuW1g1hvac1qsPOCNmE/KEF6h09HDRU e/xRBte+xKZgOEaw1Uylhz6d0bKFTsteSB9oLSR52eLDCVvBqFNrnoQsFkku30BVRttydRzpEM IIPU2N4M45//esy9gTpn57mYPp121bj7BYKezPju5CRgz4fFHwFfuv2anHJzc0ceW5ijXVIGne lHMNXsGqebHLaGnMJDcSHs533orwGLeJz3TO6TWSdMIy5HKoCZQK3hqSGU23hj0yzgc56etYaP iZr15bhdzzcknElKTyrNstbQ4WXxf8/HMUUzpzP2wmMFaw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; 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=1671226448; bh=4heJCb/sOHpQC84HzvRTnwnhm4PFGp+zBNH2MDAp7/U=; 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=ASkrjgMSMUaPXoMn/emb7D9+h1EAbCV0J9Ogmmki8fEqZzeIq5SRHdfac14FnIiPpQA20apIAM ajw6oFsB//4QcmSTOZk9EBealqETAJIoGAp+FwMJT4+ZRj9sfnsSIu0bzPqrfMk4PLaIZvXwB3 0NTi+a9SzrFt4UEgwW2bwS0cyY+ibicQdBxMcTDi/u4fSmw8ZV8NTI9l0R2JgVhIqHnoqoEWdi 2nlkk1VKB080EHjyJ69uTybIl+BUtDWbtaIasJxrdogp2iHNMHZoKJK1DXcCbqEWNk+4OQ0/3L MHbk7hOY5nJ0YeiDdD+Pkjrc7h5MXGKcJx1JN+q9KiFGmA==; 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=HBQL4T02qgDynXbP95ZCCCCUKc+lYFcIIeddQaJAtQQ=; b=ePhRR8f9uE0EX9w4hs58Ixf/fY OVbHS0CQwYAtW2Vp53AOVcxdomMlNvF2iF/YsER4aFo1d/1WcFffAHRrMcvbi4axzDXFEXtbJcunA IdbBuwFLXa5A8+y0wtP0m+tnD4yXwxBL3lHHsdeAyVN5o21zqpnudCA6PmSXvGR7vjEv5vnAoeBYe aaj8YQoPY5pFA+PziNDxObFdssGNJHha8M41bVtZj9ioHruR5/V3AN46P7DP+SjCKBejZU1Uk2eaC ZmPTboNqr8q6R4XZT87oH0fcjmyxY7jNKQhRCHL+jfmRVpW1e7XXK606yBDvMsAmCvk2iEAna3lCz DraQNqkA==; Received: by zero.zsh.org with local id 1p6ILH-0004sJ-Il; Fri, 16 Dec 2022 21:34:07 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:42295) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1p6IKb-0004Da-5G; Fri, 16 Dec 2022 21:33:26 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RN000IG2447MME0@mta03.eastlink.ca> for zsh-users@zsh.org; Fri, 16 Dec 2022 17:33:24 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id 6IKZphxEjEN8v6IKZpkXHc; Fri, 16 Dec 2022 17:33:24 -0400 X-Authority-Analysis: v=2.4 cv=IPDESCjG c=1 sm=1 tr=0 ts=639ce424 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=juY_OFpu_epoC8cwqJgA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejgddugeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <86b305e2-3ff0-cf5b-ac85-acfec1d48696@eastlink.ca> Date: Fri, 16 Dec 2022 13:33:23 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: uninvited members of associative array Content-language: en-US To: zsh-users@zsh.org References: <46161d8a-c177-4134-836e-592e5c048887@app.fastmail.com> <902fb047-3435-89a3-e7ea-74e74075c2c6@eastlink.ca> <09d09690-08c8-4499-9011-9c45d7676f52@app.fastmail.com> <81952d4b-3ead-f912-f987-fe9a37dbd256@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28567 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-12-16 13:15, Dominik Vogt wrote: > > But variables are not even a real part of the shell, the shell > script or its data. Every process has an associated environment > that consists of "key=value" pairs. The parameter syntax in the > shell is just a way to manipulate the environment that is then > passed to the started processes. The environment exists > independently of the shell. Sure, but the shell manipulates that environment, which is what we want it to do.  And the various expansions are surely entirely zsh's own doing.  I don't think there's anything to disagree about really.  I do take your point tho.  zsh is not comparable to, say, C.  At first I thought it would be and it took a while to beat that out of me. To begin with, the shell does not even have a fixed syntax that > could be written down in a rule book: I've noticed!  The parser code must be formidable. > Then, the commands that the shell runs are mostly not defined by > the shell but externally. You'd probably describe the script > > ls . > rm -f foobarbaz > > as "a program that lists non-hidden entries of the current > directory and then removes the entry foobarbaz if it exists and is > not a directory". But that is not true. What the script really > does is "execute a program 'ls' with argument '.', then execute a > program 'rm' with arguments '-f' 'foobarbaz'". What the called > programs do is not part of the shell. So, unless you want to > define the program as a sequence of "execute X with arguments Y1 > ... Yn" the shell really doesn't do anything close to what the > "program" is supposed to do. I understand.  The shell is for interacting with command line binaries and friends.  But it's internal power is such that it can get a whole lot done.  I remember in C when you had to call an external program it was ... 'unnatural', but of course zsh is exactly the opposite -- it is a facilitator of external programs.