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 30272 invoked from network); 10 Feb 2021 00:23:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2021 00:23:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612916598; b=mBXnnm7CEMjskCeuPE2tJy38If/+ZNa37PhnNWUZ1Z7343V8uQlNeG9LTP5q2eV7Hd2LIhWoWe 2L1jjUoLV9w9XSELqQyzBSzPfenU4Hy1A25lZDIdOtKcuztINZheLdjGju/888duuuhOMKuxQa 2nb38qTCsdEsm+qCysd+bXkCS2/eYNyChvwvRBo6Vc47e+gq4dsOVrOwf6L07B8c65EGS0THCa +CUy17CZZadBvTrXfUAl2VnEyYthK8iBjyrbvhT8VoTOYtWMh7nGew74NhZEaAgDGMa8HM378i hmDzwyzKOo95/wkKIy0d/1WwY2dTXzvaZJRvoVQ1e7bYSQ==; 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=1612916598; bh=h6AdfiOLemRgcyScOajokgbvGSUnZMjJ0+7MIrPYftU=; 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=S7/1GfAdvZauE/Oc3/pdyTmogy5nILUQIulJ3NND7FaJjYjPPreHas1au9h37oHgA9YQEfqEM+ eqOBg2VUXAQ8dnZibzYNjm8JuaHELxnoWPAvrxKz5SADEoOntG8Ph4BCosV17AP6XTSh1HFlSF L09TEcWtzJFBDxUnPHZaSS02iVoinCRfcIdX3VUgXNK+jbMFCQGMiZ6L/9GEKBLFrTOufQE5Qa z+ZPoOAMMDF/p1ZLzGKDb8BcSN2WgIlz7LM7j58ixGmC0DXGC3YRivyslklUpXO897YINJSO5H aoq8ltmhAhdlVASUx/9+ynwMymZ2SrDccT0TslhzYM7BEw==; 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=N2yxQXJneYvmdrE0+DHnkABLp3tJAFnXyhLezvPEFTw=; b=uUA564qW5C3H0ptPUvSwlVOuC8 kCgVZnm6s06aRj3ZQkyGyMGnRw8lk4jc1lVJ8fu3Pzf2oLdCZy0YIgioW6ZEMnoWEGMsiggxGvhnJ JauaEhoKwG/sWejZ7m+FOxPVZ3VWbOL4L21NXFAHFSkgVHm519AvS83lrkRPtluW+PXlg8yTh0lFd w/Uv+Cx8ucKbWwyEDuiFwIkVYUO6ZidIkEgbGbDCUatwoq3xXBPB7NeermNjvsTWZVsrsJiSQBeXR DyyXeS4oPKWJggGfB4hEwSUPzUDhWhE3pjeTIIL4tpZgEYH+fk9TxEpIiKPz6rWPudtDjcaXhFtyy aGy0FsiQ==; Received: from authenticated user by zero.zsh.org with local id 1l9dHp-0003lA-Aw; Wed, 10 Feb 2021 00:23:17 +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]:50717) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1l9dHH-0003Na-3S; Wed, 10 Feb 2021 00:22:45 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id F0B95CB7; Tue, 9 Feb 2021 19:22:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 09 Feb 2021 19:22:40 -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=N 2yxQXJneYvmdrE0+DHnkABLp3tJAFnXyhLezvPEFTw=; b=psKOySMzBis1sfzo/ o+KwfanQEZ6ztc/OGPBmutQcjCDP4DqSOcUXRgTnQH9zoT7bfrPKKt6RgD+7Ep/Z S4JhXio3PPmzPx8WFA5pOyXTSEbMJod5jRz93CWTjDhYQT6yA8KEl417T9K7kKm1 X+7D8CCyvAdtLwCK0pLBHClts21OKD0+p566BL9jxOE2wde5T/qMoOJJ8q3ZIlcq nVdVuF07NELwUDQXzOE8ky1YRdA8RtLYF/DO2ncCP2ZVJcOYVTluEeeNfLukH7cZ erILCrsuhROhYMqdwPDnuuXD//tn9gNt+uOOpkVA71qG28Ai2vgzvwT8GDRGtJgY rn4wg== 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=N2yxQXJneYvmdrE0+DHnkABLp3tJAFnXyhLezvPEF Tw=; b=TGx8Nrf4MyReSo//F5+DRVUxBDtfljaBUep28flvmAtuFBNK8maXVuaDL N6BF9gOBkmO5ajCOuzGYYAsUI6B9mOWiJfFeZNfHsLV11xv7LwLj3ZfrZrgv3uYo zYkKwibxuuxgtzaFFV5Sa6zYaI7ptMCAIxArYWVW3O39HSiButJx3sRP2DbTyqAB 73NS9IxrcSrWztk/q4LN4tLA0yf1i868u02/FxoM4/mybb3m4O+eEGr0AEEFc0nw xOfCQAf06tLEsXBGH3Hq8PWqLuq/IMRybB2/q6s720e50mhnQhRgRnzM6rqLKXo4 kwwsOT6djFIuhvpqqew0NVjyC7xGQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheeigddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefnrgifrhgv nhgtvggpgggvlhojiihquhgviicuoehvqheslhgrrhhrhihvrdhmvgeqnecuggftrfgrth htvghrnhepgeetheejueekgeffhefhjeevjeeiheegvdeugeektdegffejhfehgeetgfej ledvnecukfhppedutddtrdduvddrjeegrdeftdenucevlhhushhtvghrufhiiigvpedtne 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 C769B24005D; Tue, 9 Feb 2021 19:22:38 -0500 (EST) Content-Type: text/plain; charset=us-ascii 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: Date: Tue, 9 Feb 2021 19:22:38 -0500 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <52D5DA56-397F-40BB-BBA7-CE3BF7256581@larryv.me> References: To: Ray Andrews X-Mailer: Apple Mail (2.3445.104.17) X-Seq: 26481 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 6:45 PM, Ray Andrews = wrote: >=20 > On 2021-02-09 1:08 p.m., Peter Stephenson wrote: >>=20 >>> In this case, actually, all you're doing is the equivalent of >>> a single array assignment. >>>=20 >>> filespec=3D("$@") >>>=20 >>> pws > It doesn't seem to solve the problem. Here's a real example: >=20 > $ g ,H 'execute' 'g,46,w4 now default' f > ... The search string is 'execute' and the two target files follow. = But after zsh is finished stripping of the quotes the final grep command = looks like this: >=20 > GREP_COLOR=3D'01;33' grep --color=3Dalways -iFIHn -d skip -- 'execute' = g,46,w4 now default f >=20 > ... and of course it won't work due to the spaces. Input via an array = seems to make no difference. (Unless I'm doing it wrong.) If I do = this: >=20 > $ g ,H 'execute' 'g,46,w4\ now\ default' f > ... I get: >=20 > GREP_COLOR=3D'01;33' grep --color=3Dalways -iFIHn -d skip -- 'execute' = g,46,w4\ now\ default f > ... which works fine. Finally,: >=20 > $ g ,H 'execute' g,46,w4\ now\ default f > ... gives: >=20 > GREP_COLOR=3D'01;33' grep --color=3Dalways -iFIHn -d skip -- 'execute' = g,46,w4 now default f > ... and again the unquoted spaces screw it up. Is there any way to = force the single quotes to pass through as literals? How are you assembling the grep command? How are you executing it? > Lawrence: >=20 > It's all rather complicated, my wrappers do all sorts of mischief = before calling grep. 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. vq=