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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21127 invoked from network); 16 Dec 2022 19:05:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2022 19:05:23 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671217523; b=PLVlAHw6UBIoxdRZX8JE/QUk64Yk2ROIWlRIer8FlE0z617XnIHGGM5xp3g1qTerqxR4ggEv92 9K505z4PKP87PW8/u2vI5BCm1c3iJbXylpfeG+EEhD51PSmkQb5YpT8GWBpJoXOSxOdB5cHzAw CgCvBdAyC2Q93KabM8oWflkrNL/LfqsjMLPJk98L0A5mTe6om1s4bsHunX3/pfC/v2+GW5M9f8 rtpReRyrjhLzHNFKitohojEh65v64/poXoDjxdvWAlC8Sj7mupmpyx8I3XjfMi11Kq5o3lKWQc nSkN4BIyVORrMEcsPNZvVw8jBONqaqxaKW6Vxx1yLSZQTg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mout.gmx.net) smtp.remote-ip=212.227.17.22; dkim=pass header.d=gmx.de header.s=s31663417 header.a=rsa-sha256; dmarc=pass header.from=gmx.de; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1671217523; bh=Jta27qjuAPVzUuQnpi8lJyLuAf2fvLDftaDDqLJLomw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Reply-To:Message-ID:Subject:To:From:Date: DKIM-Signature:DKIM-Signature; b=I/kxRIc9FkucjUl2RuvLMA7yXidUIOa2e3Ev+UXR4st8kK7vWxBWELZCLMkl1BQxyCrZez1+C2 oBGuQvPry4xxRQwdwfk5f4ICpzvx0kmehs0Kj/V6Uthh7mzYxumEiAxtQoBQEdZ8lo6qDwvcfH NKyM8q6owG7gT9TAf8sjKsKLkfXaNcERvNaih8ab5KaWIyDQxPu/zhI4n3pkw60QHSbmQyVbGY XEp6kmvR/ZB26ls6Z/4qlhMaE9pNxb7pLgAtJyttlRcrbWJ7C/yRuUUlnwPKpp2q7tbTcy+Tuu EwcAh/x6XHkxGaZy5lTMD5rDYaH9lcoRAR8zr7KaZbjfTA==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Reply-To:Message-ID:Subject:To:From: Date:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=zCtsOlu251iTT+u8woXB8qsKOITJ7YPOWoz4gJ8ARmM=; b=a7Z/t6GSpxox2kFwYpjvK1u41T 1JpOsmYph6x6CmntwRLr6LvRdL27/ZNgxZqFsOEgVzSkbPmIqQUvCjZpuAc3eI5JxVKuHb1h+DGdZ bJ6Vj2kxdjapUCI1Q7TsJTmnBHMryQh4VYrD2CccIM5gQRvdiMHmWc3X1v8Lm93vvshKnXPvo0li5 gWTXaaldxwqyX2uf/WcxEpR522gJdlHJKMPhdCIaeghco8K+zg8k6nYngnTnHrB9UQqDw/KLfEwod 3TZhqLEjlb41y1fOQX98ELJyMndc6htTGmUI4N9NM67VyLr6ge0YzqyZvxtT3WPD9hxXDuvKW+hoR 8p2X3Yjw==; Received: by zero.zsh.org with local id 1p6G1L-000Jrx-8Z; Fri, 16 Dec 2022 19:05:23 +0000 Authentication-Results: zsh.org; iprev=pass (mout.gmx.net) smtp.remote-ip=212.227.17.22; dkim=pass header.d=gmx.de header.s=s31663417 header.a=rsa-sha256; dmarc=pass header.from=gmx.de; arc=none Received: from mout.gmx.net ([212.227.17.22]:56219) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p6G0V-000J9X-SF; Fri, 16 Dec 2022 19:04:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1671217471; bh=Jta27qjuAPVzUuQnpi8lJyLuAf2fvLDftaDDqLJLomw=; h=X-UI-Sender-Class:Date:From:To:Subject:Reply-To:References: In-Reply-To; b=P/x5Vo7QYn7/rhf9pRDdGYRa79d/ZL1hospzwPoXa4pfye5n2FJJAw4/IPBJOmGPi cjdnTyVZI634QqQroTatZbMFc/jDUJuQrPdvXnaBsIIvD2IM+c3AuNhKJ0Nq8HZhT2 tisLRB65mqAHJ4zWLHaa4NKHbV6LNiMmhRIa4VqK/iPlRAWjPekQfps03+icnhuCrH CQ9TAbL+XloPzc4np6hgBg/v0zxOOQEeP8+PuwOTv4UKCLEAOiKndWguics8E53Es3 w9xbm7UMLA0CCJ+F/ZnbTpHmY877SeWPKhpqnnLUvthoho3g4idpZOn8k7RKUVmSqN gizd3+x9oAh6Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from limone.obstwiese ([46.223.163.183]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MuUnK-1op0N23yWg-00rXqC for ; Fri, 16 Dec 2022 20:04:30 +0100 Received: from luthien by limone.obstwiese with local (Exim 4.94.2) (envelope-from ) id 1p6G0S-0001lv-50; Fri, 16 Dec 2022 20:04:28 +0100 Date: Fri, 16 Dec 2022 20:04:28 +0100 From: Dominik Vogt To: zsh-users@zsh.org Subject: Re: uninvited members of associative array Message-ID: Reply-To: dominik.vogt@gmx.de Mail-Followup-To: zsh-users@zsh.org References: <0c2b1f8f-35bb-cd52-3d22-0964a73945b2@eastlink.ca> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <81952d4b-3ead-f912-f987-fe9a37dbd256@eastlink.ca> X-Provags-ID: V03:K1:zzZApNDqafSIFXOSQDpb2mWdEaOEVM6xvcz6kyaIsNFLe9/FTly KOowRfdTJrfH14h++DoKiqwdgHy8ER+qC7i1kMa2qXg/wX3Yt25anX5z2x598PYtP977K2S 3GHkY87LNcwFz9FN2IpQNvhO5/XKIeLN5RgDyY4s96AfKWrBgav+s0tAb8Lak6Zd9hErmG5 yIi2C4llaiMeAF1FNOiYQ== UI-OutboundReport: notjunk:1;M01:P0:njQ4Lz74c4w=;RIXEuuO4pbPBxJrdYWkamsuOlTv II/9vPuu0nc7qqJsDD9Pb82VbPeYIg3i1Qb/7FoyFFRNeirJBMDVR+A/ho7VYNS09LDZo6fn0 fqXSPWs94wqg/eMjbNH4ANJWqXYJhuN4yaxToV7rtNOrhnrd4W/vfmVzNaF9WhMsTJJoIIHAt gUelZi3+je+oiMShQFmbpk0IeQgS47Ps4Mo/pO+6pQy9w90kOwnAXIbenbTj6h0vEPdqOuSYT SOV9Jv8CluAZ63dKwzPWe7d19U6qaPQzb6/WBd/zwQlTXBCNFwZTIMS51pTgcPjUIor4N3GKG ELoFoUf4wVDfUipoyri4O3AB8eboRZ92+kafzwfUPxnb/TpFKP2qQs6r8Up8uljs6JnBw5fgj Z465f+9F9AQ/tdcf44m2Px5jZdg4OyzHyo1x6ZVFEqgAn13OS80s7nEMxUPkZYij+i0OwB6Fa 6KofoYwUn5o1Dfbk4gfFmG1QIgCaroMo5MS0F5iongjeC9NQYBrYA2/563cfvys8H4aoTuKKt I+grxZ+KZMFfrT1fqL7hxC/utILm24p5iTss/liYxcDkqUCdMirJXLHkVH2J2sKB0hAQdLFs9 qGw9sbJIlHHKYDZ0t8zRcyt3J56wuA8ggGZAS3O1ZDc9sPxsoREJcP/Pfhnn0zKn+iAGAK27h xjHNzMCQNmRglfCswihZhoAIYW1lme5EFbeJCxqJKMwKQKk830hLWK+eim7PybXBVJJT7Uj2g hRkxi+H4uEOgAmcHInZYpFCluj3lmynSjnSmsCEXhYInaJJl9Sf91Sheb9BCsTeOU66CN1yXA pFE1f4Jfarv4qa1ODQ8CxthYCREUqYOvAtAPXkG2b0O7BX+oN6HVZS+XFcCGaWs0AsgMMoVmg zZ13bDZ+5jLZf14ezJXP6f0NGN5S1H15sMNd5JxuDNtQxAxZKpjuuPmFdWh2kQC8ZSKtWADjo 1R+KaSPOaG8kt6FcSEQXIvYeT7k= X-Seq: 28562 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 Fri, Dec 16, 2022 at 10:21:28AM -0800, Ray Andrews wrote: > Yeah.=A0 I'm sure many of my own travails have been due to that kind of = ... > well, one could say 'shortcutting', but more often it's simply not > understanding the vulnerability of unquoted vars. As a few weeks ago, wh= en > what was it ... something unquoted with '[]' in it tried to expand to a = list > of files.=A0 It's far to late to do anything about it design wise, but i= f it > were up to me the shells would have evolved from their warm little ponds > with a 'positive option' mentality vs. the 'negative option' that we > currently have.=A0 Basically: If I want something I'll ask for it. If I = want a > var to expand to filenames I'll request that.=A0 If I want empty element= s > removed from an array I'll say so. =A0 As it is zsh loves to do helpful = things > whether you want them or not=A0 and you have to ask for the exemption.= =A0 Mostly > by quoting but the world would have been simpler if it had been the othe= r > way. Dunno, maybe not.=A0 When one is dealing on the command line, proba= bly > file-centrism makes sense.=A0 But when it's variable contents the opposi= te is > true.=A0 Anyway the thing is to learn the lesson early: quote. I think you have a grave misconception of shells. Shells are basically command line interpreters with some text processing. A command line is a string with shell specific instructions to generate a final list of constant strings. These are then interpreted as a command name and its arguments. There's no conception of symbolic values; all input is just text. Shells are are not "programming languages". The shell does not know about file names on the command line, it just expands strings to filenames if they contain globbing patterns. Ciao Dominik ^_^ ^_^ =2D- Dominik Vogt