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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21550 invoked from network); 19 Feb 2021 16:51:24 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Feb 2021 16:51:24 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613753484; b=fBBQztoysxnIefuZB5X95B1sVlMAkGk+Ql1K8cYrSwjSXn7Q+0hLxAJ7T3rsOf6iixkjf0eT9d li0Rhe53DEd0iAbCZCSWlwIw1XqVYZODgVC5xvpa4vWaUnwyoIFMzluagzHcgKSNI2C6DCRP2b UciLsgOacsRhCcicPNrPIWIRWliKHMakc7MyaMCxo1WsZyZYoIrogOIsKPrZjkWAsS1o1wAC5C psKgoJeR9YKkakcG8oz4bnO9tF5KxjqzAOOYVyKV66yeNwDlGtFH0aBdFp+MlQv6F/Su1UBW66 IeNZ1Vr3nJ2QQ28CYLhZxB0u0gCxujCeqzmowUe/geaBTQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613753484; bh=L45LnJZTT824nCPmGl1EIr9Q6JDN8XmJRNQYwBd+3pk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-ID:MIME-Version:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=yhB1Hj2nf4rgQP51gtXS3wjjvibPHhF+rib44AZFVP4CSmrB24IZLdddO11/1i2nRpoxDJyigO IbuM3j1h0ABA1rRWpsAvdaUJKk8rPlKfsUmmpgJqcYWBXHkI7ipnoYGFA6X6E2dwCRacMbikoM NBQ/sqB+wzXW5a6SaN8Vp8WkGF9PYtlSt/5OBCgWC3LKM1HIs4RrFvHuN3NUpkThNxAP4fxAB0 qs7hW0c+qYT4uCiDyNOWVQoeFQAwa7yha7LFYw9bNbiBpckYgxEHDh2CeSr8TOb8+TaiGWC3Pz cryBI1sWcUISTBQDK2TL1QlBEUcjuEWVa8bn9A8HkDVRrQ==; 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:Subject:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=MDtMR3XH0W1617nMGOLFCUO5CjF/ynSrAu7w8wdYvpI=; b=DEPrGbrw+ESgRMeBPmv8iTCdL/ 5H4H+Mc0i7JHB/EeATYtkEC1S/MJJoZpkiPJIJwMxzkxH0dRcZ0nLunwO9Sb4gsrTI5VXP12TjdCL 3s+ZcdVfC5q9GJE2lB5bo7ZmIJiO5ZRWBNiRQyaajUKdulZKhYfAeRIcMRePBYiW1vYRpgmMTln/A f/dnXeZULV5M8Abiv+84RvH1qCdBgVKjsgtdACOhePAQvat1G98jFHg3Yr/3Ip879bohtZKghp4vw y4Vl3xoERSBrK2TQg9llQXOtqXdrdEaNEdMzmXqc/Don9RIck6WfVGr4/9xYRKZOBbGeNvMEsgxDe Z/Gzi74A==; Received: from authenticated user by zero.zsh.org with local id 1lD8zt-000JCM-0d; Fri, 19 Feb 2021 16:51:17 +0000 Authentication-Results: zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58367) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lD8zI-000IoQ-6a; Fri, 19 Feb 2021 16:50:41 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 518485C00AA for ; Fri, 19 Feb 2021 11:50:39 -0500 (EST) Received: from imap37 ([10.202.2.87]) by compute3.internal (MEProxy); Fri, 19 Feb 2021 11:50:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type :content-transfer-encoding; s=fm2; bh=MDtMR3XH0W1617nMGOLFCUO5Cj F/ynSrAu7w8wdYvpI=; b=PqMFe2g7iX7kJjr9Lsj37q+R6PfhY/Ys2wQRbtZ9bd A/yGm8NtoibkRo2EATblbWwb+67vUU7YOtYzX5m86A9I5mThSLDdU1wr8KSfTzBR Zpe4T44OgCVhJrDMx/wjY0khlvz908B5/+eTBgLZ+mflVAZmg5RDhZKDWracC/T7 j4wlXgGbxNrBuF23C9Sfin1aLLsAdIIiVyKc2UPsKJSN/aatHjlkzNQJEVhrqiWF JJsNw2Q0SgCQHdCLQ/Kb5jVJUn5+MhEjxfd9VwOAjYFEUW5fnFcwSqjk21JrhwbZ vXa5DZiMp28RuR4nS7gC8LGeC1YnrhUOvB/Hw5MrD5nA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=MDtMR3XH0W1617nMGOLFCUO5CjF/ynSrAu7w8wdYv pI=; b=o2ZavJUIOIDP76usk5iAVBmDgC0R+E+ePFm2PXCYPTw9fRfLqEgbsjzSd m+ESQhCIuj5KzfDyZWFewLVvQyxCkzolnjT2uSifdiE4qQbjaSrlOXdElSSd7I4E ods1dGACSTL0LtCF4FOFxwp7lKfOBk7oioO08rNSXCnV+InYRmtPayeDN6SsWvXV oPx0B9brKZqztdQdKPAqz906AOu/l62zRH0KvMmWcNXi2q9R6iDj0+HHUbXjey08 U53UrvIVZCI7SLjd8aqXC6Zt9uMqaipz7WjPERZ3/lK8c2XfdeAy4nhthmNFoKfW uFJlZ56WgQjBK1LMYJfQcdxVIs31g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeeigdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdffrghn ihgvlhcuufhhrghhrghffdcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg eqnecuggftrfgrthhtvghrnhepfefhkeefveeileelheeiffdtkedujeelvdfhtdejtdeg gedvuefffeelhefhvdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id F21596B4005F; Fri, 19 Feb 2021 11:50:38 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: In-Reply-To: <20210219161010.GB7102@tarpaulin.shahaf.local2> References: <20210218134039.GA1492462@zira.vinc17.org> <8b3a9f93-5eb4-4d4d-8312-58c371e12239@www.fastmail.com> <3e34714d-d0f0-4b8b-9f2b-fdbc10c85854@www.fastmail.com> <20210219161010.GB7102@tarpaulin.shahaf.local2> Date: Fri, 19 Feb 2021 16:50:18 +0000 From: "Daniel Shahaf" To: "Zsh Users" Subject: Re: auto-quoting inside braces in arguments Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 26545 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: Daniel Shahaf wrote on Fri, 19 Feb 2021 16:10 +00:00: > Bart Schaefer wrote on Thu, Feb 18, 2021 at 14:44:29 -0800: > > On Thu, Feb 18, 2021 at 2:13 PM Daniel Shahaf wrote: > > > > > > Hang on. Why would it matter which style of quotes would have bee= n > > > used? > >=20 > > In your example, what if $foo and $baz have an opening and closing > > quote in their values? By the way, the scenario you're implying is this: . eval ${:-'"one'}${(qq):-two}${:-'three"'} . where (qq) was deliberately used so as not to interact with the literal double-quote marks already in the value. This sort of construct means there are _two_ levels of parsing that are going to happen=C2=A0=E2=80=94 one for each type of quotes (for instance= , two =C2=ABeval=C2=BBs, or an =C2=ABeval=C2=BB that runs =C2=ABsh -c=C2=BB) =E2= =80=94 and therefore, $two should be quoted twice, as in =C2=ABzsh -c 'eval '${(q)${(q)lorem}=C2=BB (where th= e outer (q) is only correct because the command name happens to be =C2=ABzsh=C2=BB= ). > As I wrote in the part you'd snipped: >=20 > > > > normally $foo would be constructed to end on inter-token whitesp= ace, >=20 > It's of course possible to write code where the number of q's in bar m= atters > (for instance, =C2=ABeval ${:-\$}${(q=E2=80=A6):-lorem}=C2=BB), but th= at falls under "don't do > that".