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 12189 invoked from network); 10 Feb 2021 02:25:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2021 02:25:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612923941; b=Gs+M/RNnMU7FMu7c5e/yLRWTDOqdoOr0cWCY/TTKZDiSjniMqLUQaMyqg5TozAX5ivnbbHyU8g UNwL0JYP9UVTOgEAlNdx1BLRgQH5dPMgwEaaYWvwEVZQnAgNhNQayBpSAesnjncgu4TOxNqeRi AbTqizvJcX6+8jy0ZHEe74Cv0j9c7g0CgfN/ytGChfhiY0qTuEWDe1l+lUfqNWwDsArzT6Zpc/ NRlSi/yqwHt+KLqt/Lzu1EVIn91UJJcgKyEPUHA2zQ26pf6MAVGB1789eCguxMxmUUJuf0jytk cNff3DA9okC3a8i9ZRMnM0DwaD0zod89sWkAh31yDFXuvw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; 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=1612923941; bh=8gOvjBjqDyokE0upl/6PnMMe1g4b5HYmU9CqIsiLj5g=; 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=Bs9dZtGCdlSb/ioib1AfCeivC+HFMbYqp91Ic9ioTaGEJtxlacma+kdvW9bx+n6EkObSJ7C+6d bjj7ZOdHc74B7AGjm/JCizhimUOwzPkRDiTwYujPpGIua3GG7xZLYbfCaHwTESlxLJNUVwFVgN enE9F3inEi5sZMK1PC8xUL/myaH9ukrcGwIWknXsYQfpXn1QQIUIZV2uy2ROT0IdJ/gjPq+llA bcE45oLpbvZnqS2dXev//dNfw5Ns1stty/P30rv/ypIok3CoahkV0zr/M6/oRQUoOebIvTCnH0 kT71SKF7K+KIHEdYxfAO+Y+aBTjN5QMn94d6WRQj1TJxMg==; 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=VxeWCXRhE+SHLi7oPDCYy32elPy1I7bsq6br/4HdVDU=; b=HTkHphBMc3EH8W++2Fa6FSxUPu ZdWSCAJ0p4b8pxfpkbEMC9ZEZ9YcAI5XQumCiC+8MDWfEJ1/SwSRuIijHKtRQRu99BNAxkAchzB1Q ux8uNfHylraEMswhSH8P5z0Xpi1jWyXbhZiEUrTkjivuWnl9T5QmNqRJtSR+YKW7ogfrZl3B5b3o6 jH7VKekl3iTJtAV9n7+il68Md0x4kfttB/7b5hOpdgxOMJZ4Li1ZyWjHcTcjRWlGOTN+JZfcYaDku wBI5ozN/AjrzKyyYoExrg0+s8vkL19OWB3oQtQ10NPcssA0JLMb1/tbuupRig8TrJwjQKSErTpYsw RHuBF+Ug==; Received: from authenticated user by zero.zsh.org with local id 1l9fCH-0008rA-JE; Wed, 10 Feb 2021 02:25:41 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:59307) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l9fBi-0008Uk-Tq; Wed, 10 Feb 2021 02:25:07 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta02.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QOA00OUAIBWJD60@mta02.eastlink.ca> for zsh-users@zsh.org; Tue, 09 Feb 2021 22:25:05 -0400 (AST) Received: from [192.168.0.3] ([24.207.90.194]) by Eastlink with ESMTP id 9fBglQIx9nkRC9fBhlZGsd; Tue, 09 Feb 2021 22:25:05 -0400 X-Authority-Analysis: v=2.4 cv=B+J8bMhM c=1 sm=1 tr=0 ts=60234401 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=qFgQXUrZSFf5lLYQMAsA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheeigdegkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeekvdeuuefffefhvdeuieetffdvtddvjeegueejkeeiudehieetieehgeetvdfhfeenucfkphepvdegrddvtdejrdeltddrudelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrledtrdduleegpdhhvghloheplgduledvrdduieekrddtrdefngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg 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: <52D5DA56-397F-40BB-BBA7-CE3BF7256581@larryv.me> <29a203d5-bf53-9cb7-7a49-2705c3b1d8f2@eastlink.ca> <3E154CC1-4B1F-4ADB-993F-89100A7F766A@larryv.me> From: Ray Andrews Message-id: <1aec7108-8a44-8866-1db3-7d93f614582f@eastlink.ca> Date: Tue, 9 Feb 2021 18:25:04 -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: <3E154CC1-4B1F-4ADB-993F-89100A7F766A@larryv.me> Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US X-Seq: 26485 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 5:46 p.m., Lawrence Velázquez wrote: > ... which youhave already decided is an ulcer and cannot possibly be > anything > other than an ulcer. It would take far too long to explain the whole show.  If you have the time and interest contact me privately and I'll show you what I'm up to.  But I already waste far too much of the list's time. > It sure sounds like you're assembling a scalar and eval-ing it, That's exactly what I'm doing. But far more. > % () { eval "print -rC1 -- ${(q)@}" } a 'b c' d 'e f g' > a > b c > d > e f g > > Thing is that if those args were going to grep and they were filenames you'd end up with: $ grep [some search string] a b c d e f g ... whereas your filenames are 'a'   'b c'   d   and   'e  f  g'. The single quotes must be preserved or the spaces backslashed.  But as  I just posted, double quoting the whole filespec: "a 'b c' d 'e f g' " ... appears to be working fine.  grep looks in four files not seven.   Seems the double quotes preserve the single quotes.