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 7717 invoked from network); 10 Feb 2021 01:47:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2021 01:47:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612921654; b=fvYKdgscHrTyy/mbGcrSEfU7lc6I6uNWDuXd6i5ySK9ht0V9S1k0KNHRgM+pf9/nC/WgnlINGp XbQrEVU3tVCX/mhM5ovDjI/toDH4aKlB/flhh+q5bnt6YVnadUcjoY9fLFvo5NCFm/qyWqmwJH gUSTP1L7LfcxIoFeEENNQMrdjeYm7zMWWLSEYsy07PZBADwF+fHeT8NsWZg2ONCCZebF1Bdp42 jRbfPjLbnmC54ksSnTI8u49jsUbSYeaxbcLTwMBJXlKkiPJ+ALVHR0/RM67oBQ2HIoecEyPuSN CPA60pnFYTLX/hGzYIirC+w/QDdMpYKfOpg/5M35t4rHTw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout1-smtp.messagingengine.com) smtp.remote-ip=64.147.123.24; dkim=pass header.d=larryv.me header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=pass header.from=larryv.me; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1612921654; bh=ZNdzOrWEJyaaZTk6IA1PsOrPGsHgxniNFa7WyzbkrC0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=Nxk2Y+/bhL8Sw4wmP0cLl8t2DjuQIGOJWAr+18qxKR9sJg2mPjZVaEcrwuiXyLYhw3g7dnxZK6 NHwAYYJgCWDJYuh9rmNFNVN47VKY8wDolaPEQF6mKcO6VPi2ZfslZHyD0BQ+aKvdYcVUcyzS5F Lkjq27X66Lr28SmXDyTEkXRW+CXOEfC5c6W2G14W20TXlxRpjNR7sJp0PUjPGMhMdejRnFNUXM AcJBkzrsIY1ab5WiMiVFGcMYGIbmpQniU9v5jHQPpHr5wiCv5A+nU+SQI/dYKnEpcT+v8L350p tduTKacBrXlyOTJStzv2oqrFxJoTvvpHaEzs7cr+Dm007g==; 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:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=1WRb2OLQSm27zDAmvHRi40aGG7b4G7jay7WedrWo/MM=; b=Fmaq6JIrHaZbJR+KmuIrHwqLBR HaeC4NSpa85x2xqbEPMTPxt2UnlvKD9m4HmiI1cUcV7ynYfLL6HsZZ3M1D1s33XwMmQmL2RxhvjlA WGbcF9BDirjKihYdzot1y6xpBXv5OqySuFlPb5ecwVCJDuakxBX1595FucTqwmpNhBwzH9WX+dE2G Q/QzVoWgailgvGo4F4pzoANpWefBql68HMk2pkDQEUV6CYJZYA1Ckt8PfM5gVKK6Y3UKJAO++mFIJ yVra/6avfSZZMczQ8BMxx8MgdQFyb5DU0vb/YySoAKueIBrfLjSdqA2aLjPgwU9b/FfK+e3wXHdr2 9OwOIaVA==; Received: from authenticated user by zero.zsh.org with local id 1l9ebN-0006r4-Fk; Wed, 10 Feb 2021 01:47:33 +0000 Authentication-Results: zsh.org; iprev=pass (wout1-smtp.messagingengine.com) smtp.remote-ip=64.147.123.24; dkim=pass header.d=larryv.me header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=pass header.from=larryv.me; arc=none Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:56173) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1l9eas-0006TP-Vh; Wed, 10 Feb 2021 01:47:04 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id AE8F1CF3; Tue, 9 Feb 2021 20:46:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 09 Feb 2021 20:46:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=larryv.me; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm2; bh=1 WRb2OLQSm27zDAmvHRi40aGG7b4G7jay7WedrWo/MM=; b=C5R+59vipa5q6ROss dBMMyOBCpYYSsOXxUZTqSLeOm5+j+A7b633gL2B6n+Sc33PJ0sI8rQwzy/EN+qP9 7DB8poOEAnaWxtNUqGthkaT0C4eSDlTyhsFKEP6UjPbQJZ1gm7nVzx3Mie4P+9wF qWV8TDr0VOJzrV3qqft6GdanCE36EJIdTy/3exuIuy8i+fnzGNR2sdUjvADHexpA 1QT2ngxWSiDoazBFGZ0QIXY0ONBN7GtXBt6UNRP1IbVejOp86Ki3/roKqg0wHhya NKizH/Os+9PaNzEJSAXSDPzM5PLyCVGBTOzJva914V+g6zq0gMo1uxAwHKUwBKrp KnFIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=1WRb2OLQSm27zDAmvHRi40aGG7b4G7jay7WedrWo/ MM=; b=qrQiZpFqJL4JAFChjf8de4Onfv982do1VNBUMKT1Qu4KCW2UWzyqTW8Ri bVfAdF6ImW70LB1CxyfFD/kiKYYWw0E3Xd6EgCLgcE1iTsFvoX7fb/qxdtVfk7k7 l/umI0ORI4FW9+A2nl2fPQkihio4w99lbjq1DAczDToh+4nZD+WaSRmm414BK8Ku DiRzSBOIrq+IiWActUcJiYRPfeGdBk8v/Wy7X6hUdYsahVuJqaNCYeP/mtVZsKyP Lb681DPPZrHbebrE2eQbFtHAJGCd+lY8etfEfttHl4cf1Vr7NxGunwIYhfIKE6eF vph0g1r6k5t6m8ajO9O4ILtXe+uUA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheeigdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefnrgifrhgv nhgtvggpgggvlhojiihquhgviicuoehvqheslhgrrhhrhihvrdhmvgeqnecuggftrfgrth htvghrnhepudekjedtleehvdduhfevleegteffteekhedvheejteelffdvgedtjedvueeu geeinecukfhppedutddtrdduvddrjeegrdeftdenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehvqheslhgrrhhrhihvrdhmvg X-ME-Proxy: Received: from [192.168.1.15] (pool-100-12-74-30.nycmny.fios.verizon.net [100.12.74.30]) by mail.messagingengine.com (Postfix) with ESMTPA id A6E8F1080057; Tue, 9 Feb 2021 20:46:42 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: protect spaces and/or globs From: =?utf-8?Q?Lawrence_Vel=C3=A1zquez?= In-Reply-To: <29a203d5-bf53-9cb7-7a49-2705c3b1d8f2@eastlink.ca> Date: Tue, 9 Feb 2021 20:46:40 -0500 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <3E154CC1-4B1F-4ADB-993F-89100A7F766A@larryv.me> References: <52D5DA56-397F-40BB-BBA7-CE3BF7256581@larryv.me> <29a203d5-bf53-9cb7-7a49-2705c3b1d8f2@eastlink.ca> To: Ray Andrews X-Mailer: Apple Mail (2.3445.104.17) X-Seq: 26483 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 Feb 9, 2021, at 7:51 PM, Ray Andrews = wrote: >=20 > On 2021-02-09 4:22 p.m., Lawrence Vel=C3=A1zquez wrote: >> For the less clairvoyant of us, your refusal to reveal anything but >> the smallest slice of your actual code makes it rather difficult >> to help. >>=20 > I'm trying to keep is as simple as possible because the totality of = the thing doesn't > matter, just the specific problem. Imagine developing stomach pain, self-diagnosing an ulcer, and refusing to answer doctors' questions about medication, diet, existing conditions, or anything not ulcer-related because you're "trying to keep it as simple as possible because the totality of the thing doesn't matter, just the specific problem", which you have already decided is an ulcer and cannot possibly be anything other than an ulcer. > When a function argument will end up making > an argument to grep, and the argument to grep must have single quotes, = but the single > quotes typed in the function argument are stripped off. What's the = solution? grep must > have " $ grep 'file name' " with intact quotes but zsh always strips = them off. grep does not need those arguments to have single quotes. It needs them to remain a single word, which is related but not identical. > There > must be a solution. Or perhaps I'm stuck with " $ grep 'file\ name' = -- seems the single > quotes preserve the backlash which in turn forces 'file name' to be a = single word as > wanted. It's ok, but I wonder if there's a better way. I thought the = (q) flag might > do it. Memory tickles that I learned how to do this once. >=20 > Hey, just fiddling around with it right now and: >=20 > $ g ,H 'execute' "'g,46,w4 now default'" f > ... double quote the single quotes and the single quotes remain. = Logical too, outer > quotes will be stripped, so just throw in another set. Final grep is: >=20 > GREP_COLOR=3D'01;33' grep --color=3Dalways -iFIHn -d skip -- 'execute' = 'g,46,w4 now default' f > ... all good. It sure sounds like you're assembling a scalar and eval-ing it, but who's to say. (q) works fine in this toy example. % () { eval "print -rC1 -- $@" } a 'b c' d 'e f g' a b c d e f g % () { eval "print -rC1 -- ${(q)@}" } a 'b c' d 'e f g' a b c d e f g -- vq=