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, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25962 invoked from network); 9 Feb 2021 23:45:52 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Feb 2021 23:45:52 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612914352; b=JpK2CyWUyBRasescPvWlhtdlxtxT9jDaVu1A/4dSvPrylAB+4gIkvWBwkODLMxmH4OpcGVoJ4a ni5Y3noNmOzZYNW+MbtYnOVJ6UnAX0zdPdG7VwLc9B/XuNTQa3Z+jCrhEjG0L7EcHCwA1LkqXE rTHEADdnJC2A0kwiWkslVzRcXL0YeH6D8XoI29LV6oT4LpuCsv/mqpRo3lG7OEgKec07l/b5c8 9jK5q2A1s5tVRGaV7hB9Z74Nw4wmez3eZeR03W3e1IHsxJi0Sa1GvG5dBgagCjcJ+7GPGXZ1fa pguvpNr1r9WABqWDyyvWEhjCm19HNfRXR5UDRrJpU8/i/A==; 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=1612914352; bh=xg6IViRXn544BImImaKLBuZqa+/m7trJR7+N5M4UCaQ=; 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=Vx84nsRalXp0B1xh/kDPcI+veiTSnKv3PucqpDbrw9acq4ZaM4jlD1klzwTcGDiNNTvbG+H3UC 42Raarc8AZp9l94FMlS/BthBYDCFlbs+gf/Lf4x3nnK2a0nBGT4uE8ynctIVXsYujXPDV+6QZ5 mWEezy5/9hkQA9nRx0X/dHQufBv0jjyxKtofC6lY3+j1hp3nwEVeRbwraWaMKgHWsxyIz7RMFs cIXS2XbsU9zHRQdtcZdU7ngFPwBw+oUhKcY7uakde/s1klJoHTWgkMhSzMl4pag7RVOxC2qUrC 8rRoRHecjpgC49+zWGUyLwjagoP3LXslai/KhER6HMXZLg==; 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=nxkMGyNlHMyKtyc6hV5W66BYXb9DDOX2PpKU/v2stSA=; b=oJv/PffjpOlqWRTw5u1yxsDPTv LeTa0MaZyp4lTAMl0blRuknhp/4zxPJBi/yfErUdNC+V6yJiHrxUuVmynjAANGniijtXi9pW6dW+I KvAV1lx8o739fadcQamG+gGSsTtJ9qtjfOjxCNOypvzt1eh8+3dFsYUJkHeR+pzXxwjHXf7sdZIUx gAdtMFgLd5G01OnSie0F3Gl6uZZAOc8msx0xpqDBVFr62k1HIrpH+/3KDjnq+UmFRI9fgO/CXGb6n 2i1YyXQbL90GnJ0pje0XYrMX/opOyh+SqHOElUQ6CT30PFVNekAvIh2c65hNhyhkphrodD+8q4Va8 Msh72Ptw==; Received: from authenticated user by zero.zsh.org with local id 1l9chX-00021Z-Rj; Tue, 09 Feb 2021 23:45:47 +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]:47472) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l9ch4-0001eu-0J; Tue, 09 Feb 2021 23:45:18 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QOA00CFH9BEJ8E0@mta03.eastlink.ca> for zsh-users@zsh.org; Tue, 09 Feb 2021 19:45:16 -0400 (AST) Received: from [192.168.0.3] ([24.207.90.194]) by Eastlink with ESMTP id 9ch2lPtW7nkRC9ch2lZC5c; Tue, 09 Feb 2021 19:45:16 -0400 X-Authority-Analysis: v=2.4 cv=B+J8bMhM c=1 sm=1 tr=0 ts=60231e8c a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=gXYr1hIY6Ba7W8wuOnEA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheeigdduhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeekvdeuuefffefhvdeuieetffdvtddvjeegueejkeeiudehieetieehgeetvdfhfeenucfkphepvdegrddvtdejrdeltddrudelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrledtrdduleegpdhhvghloheplgduledvrdduieekrddtrdefngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: protect spaces and/or globs To: zsh-users@zsh.org References: From: Ray Andrews Message-id: Date: Tue, 9 Feb 2021 15:45:15 -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: 26480 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-09 1:08 p.m., Peter Stephenson wrote: > >> In this case, actually, all you're doing is the equivalent of >> a single array assignment. >> >> filespec=("$@") >> >> pws It doesn't seem to solve the problem.  Here's a real example: $ 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: GREP_COLOR='01;33' grep --color=always -iFIHn -d skip -- 'execute' g,46,w4 now default  f ... 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: $ g ,H 'execute' 'g,46,w4\ now\ default' f ... I get: GREP_COLOR='01;33' grep --color=always -iFIHn -d skip -- 'execute' g,46,w4\ now\ default  f ... which works fine.  Finally,: $ g ,H 'execute' g,46,w4\ now\ default f ... gives: GREP_COLOR='01;33' grep --color=always -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? Lawrence: It's all rather complicated, my wrappers do all sorts of mischief before calling grep. BTW Peter I'm sure enjoying your User's Guide.  It should fortify me enough to finally read the manual.