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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23261 invoked from network); 18 Feb 2021 21:50:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Feb 2021 21:50:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613685010; b=SOqWzhqCgyWg3+TsGY6EfaEGiev870JA+QG6GN+V6i74X5B5TNeze0KCiIjOTwmWq6qvIF4ky+ VCnKblnvaXoNadE+zAc9RMYqfd5rVOsLEakpxkWeGFYiJK4glWphBJ1YujNu8C2UBUrvluF+Pr P7ot9DejWkP50AgdlayEn3gADNw4Z5tmhhP9UsKOktl4ySriqSzxy8pdxBimMYqEV2XeiXA3Uv 2GE1PXUS9yzsHzDyCGoc/OKTIvmuFMQ0Puw9dHQz4u3cZH6ToLn3AE4UDGmh/gMN9P4GEgr6J9 DL0zAf9f94Z15h+/78gO5bhoejSVFwRxr3QChoAmwhj2rA==; 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-20200801; t=1613685010; bh=K2JnfZGO5TEESUGJEXVA5aXYGN004h8K25xXZ53mdz4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=Ga06f34R7VP1WcCu2lqond3PKfdBQYdpppb2lJbAEPxeNCklBJH1js4tRh93D2MySORjkKPdbA kdHHJPyv1YVWbAVe9D4Cc9PeKglzpCtUOhb8CVjd6iDLiM0zXSdOd1KGgndKIRpM14QScGz9e8 /XP9E6S3wOUoukwy2zj9xFiWA/R5X9ERl6J64dMkMHe/2sDI16bGbM5W+fBAqSWWJonx0vkHsW ZNTxFi38czhQBhS9llAzhGJKMmUbThx2uIkXlKjIlkUxuOGXwjicwBs209+EXp6ZrivumJ3HOt 9ljjLZn1SQood3ulVxB4Q1sGh8waoxG3M+ZoazipXiIeYA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:MIME-version:Date:Message-id:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=QY2RaT+JC4b+6Dwj0qZJkNiCHJg41J0NWYvrait1hXc=; b=C5t/4TuPJekz5yxbN/+P3kP0pD FNUHmlnV92tsyPZb+6bYAl4DWTzDRy0QPG4e2e4KzjCWWqzfsmEWLMOLw2ZTRVTPYVEg19fcX0al5 kltiIxvyphUbWXyx0VzevAc0lazI+R2Oe4xLpz30qkNtS3h7XPdgaFKkkD4ZU4+r474dzKQOL8dHB WikMx8gggQVYwkLbr7R6wSCOA3mR6upIvSjMyPe0lidXYMQroa/qUjruuco+hwQbmQev5zKZXHxKd XKDM5cneP8E2KPGJDZkQIDde936uwqkkmDLgsrRR9K2/2HumyhfNVXQG/Bws7j5WVkPMbGo0R1CRF tTwUp1ng==; Received: from authenticated user by zero.zsh.org with local id 1lCrBY-000Jio-Hi; Thu, 18 Feb 2021 21:50:08 +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]:59183) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1lCrAx-000JKw-TP; Thu, 18 Feb 2021 21:49:33 +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 <0QOQ00BQQPFIYMX0@mta03.eastlink.ca> for zsh-users@zsh.org; Thu, 18 Feb 2021 17:49:29 -0400 (AST) Received: from [192.168.0.2] ([24.207.90.194]) by Eastlink with ESMTP id CrAvlu0Iczvv8CrAvlCRid; Thu, 18 Feb 2021 17:49:29 -0400 X-Authority-Analysis: v=2.4 cv=QdKjAuXv c=1 sm=1 tr=0 ts=602ee0e9 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=gir0-LH0AAAA:8 a=hc_tpYYPBw8vx2KKm5cA:9 a=QEXdDO2ut3YA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeeggdduheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepkedvueeuffefhfdvueeiteffvddtvdejgeeujeekieduheeiteeiheegtedvhfefnecukfhppedvgedrvddtjedrledtrdduleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdeltddrudelgedphhgvlhhopegludelvddrudeikedrtddrvdgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: auto-quoting inside braces in arguments To: zsh-users@zsh.org References: <20210218134039.GA1492462@zira.vinc17.org> <8b3a9f93-5eb4-4d4d-8312-58c371e12239@www.fastmail.com> From: Ray Andrews Message-id: Date: Thu, 18 Feb 2021 13:49:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US X-Seq: 26535 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: Archived-At: On 2021-02-18 11:07 a.m., Bart Schaefer wrote: > On Thu, Feb 18, 2021 at 10:57 AM Ray Andrews wrote: >> Given the deep desire of shells to strip and interpret quotes > You're still misinterpreting this. It's pretty straightforward: > -- quotes are interpreted ONCE when the command line is processed. > -- the only time quotes are ever interpreted AGAIN is with "eval". > > Stop "eval"-ing things and you'll stop having problems. As I was saying, my whole zsh universe revolves around it.  Might have been a mistake at the getgo.  Still, every problem has been solved one way or another and it's me trying to make the shell do what it doesn't want to do so if it isn't easy that's my problem. > > If for some reason "eval" is absolutely necessary, THEN you need to > assess what quoting interpretation you WOULD have used if the > argument(s) to eval were the original command line, and re-apply those > quotes, which zsh makes possible with ${(q)...} or ${(qqq)...} or > whatever. > (q) gets close to my philosophical instinct of how the thing should work.  But if there was some way of providing a string with absolute protection then I could proceed naively -- the string is always going to be exactly as I typed it.  Nevermind tho, my functions work 90% as close to my theoretical model as I could want. Remaining issues are whiny not substantive.