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 15378 invoked from network); 10 Feb 2021 16:29:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2021 16:29:50 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612974590; b=IhDhx5NVL2qOkjzJSg+2ci5lDKjSupKu+iqrS3WFCyJGtBRYuWscxd0lR8CIklgsLUWt1i8dXQ G8g1rXm1aebfZGt4ADUeVcRjHLbLEXAaK4vIosm/7uHhBSWTsX5x1B5rPood+9imdAXdgmILAR x+hPj+Xw+W0xPHBXlM04yZu8So77alubNM4eyfAmCMIp+k5dDnJG5VlOo8WLNfMWCxhu7AeooD HSmgwZIdVMSFdokE6eE/pNzc1boLjxE3Pdc7AJFXH2eMMjvGqU/rfK0QseSzPKzZM/9pCrxzXJ n8QQece5POsoYDWABzYI9pcG4h9HfzMQ/t7pygsLVLm8UA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1612974590; bh=Y3VWk8t6XmMKLAJFTEreHpqi3aF+XdrqsikIKtVlJ0Y=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=Yi8XOLGOoG2FD27qUoHKm7nSn0CIYAJ6lzMuI4XbkR+utztzVSKqa1C6LOMm+04dLkWc+gv1sM I5IQYCUbUSIr3ZZaqyVOD9NRRxidh6UPHriUvWjk9c5rz2Rk+8KpbZi1YsKHizTrmCdUtM7JgI USJKB0aJaTsITWNErw3Hih68L7XLV+CVnZ9z4EzXZtF2zy5FfGnWZGzXOxoqEPI6bMHMtKJHRn 2w0j5QolttAQM32Se2vZBVR5dEix/zN1MrhM9Shcr8a4huhY4XkIDXMmOE0b7Yc0SRau70YRWH D3K3HQ79Y2IjsWUY6S1AwD5xx02cBlgQoQWSa008t3OgHw==; 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:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=f20YKFi4K9NygNiTtQqTt/WLvCmOjAlxBEoMMFwjEpo=; b=GErzd2NEmIw+Obj0h2mGiKQXz3 FxItMGwGakP93l/WuLBBZV62VOqlDpUvAOdZZ8DxXmg436DEsHJGiNNAHVN0BnviOo2qcWzLZy6EA i2gOfKghyJu7f0ryF4D+IPAzuGE6Ox5PVMKDV14cDb7C+qWwZ5L6pXJM8bfWKJx1uQv0DWCQEJzQ8 mSkAxTEoktYWc2AJ+9bPsZ0wNyjZojnVGQlaeRNlwo83GjQ0fn764A+qnUyXUVxoesmwimgWaoK02 N4rwCHnrhi2NK+C4SoJzd8bmG4+tRye0fMkQKXxIEKAVt2u/ellUs8kEwhXROKa5+aIKG0XFtUMfu f5FIFNtQ==; Received: from authenticated user by zero.zsh.org with local id 1l9sNC-000CsY-Js; Wed, 10 Feb 2021 16:29:50 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:33792) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l9sMP-000Bug-2o; Wed, 10 Feb 2021 16:29:01 +0000 Received: from [212.54.57.81] (helo=smtp2.tb.ukmail.iss.as9143.net) by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1l9sMO-0007IE-Rt for zsh-users@zsh.org; Wed, 10 Feb 2021 17:29:00 +0100 Received: from oxbe20.tb.ukmail.iss.as9143.net ([172.25.160.151]) by smtp2.tb.ukmail.iss.as9143.net with ESMTP id 9sMOlf5KRhdRd9sMOl9451; Wed, 10 Feb 2021 17:29:00 +0100 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-users@zsh.org X-SourceIP: 172.25.160.151 X-CNFS-Analysis: v=2.4 cv=MqCXV0We c=1 sm=1 tr=0 ts=602409cc a=Ip+kZtMD4PYul4iMASbA3A==:117 a=DeGUKtW0en8A:10 a=IkcTkHD0fZMA:10 a=zAZwVUNnDPoA:10 a=gir0-LH0AAAA:8 a=zCJ5Yi9-_vm5BAt0cM8A:9 a=QEXdDO2ut3YA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1612974540; bh=Y3VWk8t6XmMKLAJFTEreHpqi3aF+XdrqsikIKtVlJ0Y=; h=Date:From:To:In-Reply-To:References:Subject; b=AYj2mGDp6gfsTYeTRRhrST28E/J3sJAHhJrPKx0TjDBvDJBznNLAqHoiwx82YzGPh IsspHbb/Izo1cXKsiUateA1jU7wdSL3qrBX4+kThIYhGoG7TFQ7bCB+nhMyAkGe8Ss zzLzN1kWFh9YxV7JO5sDbG5hAWcXlSbgEwrk86Sy5seUlCnpAgPH+/nhslvGITGgm4 q9F1eK1OnrdjDZYWlBZ+uxMmophzB/2K21eftEuDsySXAENVGbLezk/R04Zc1pQO6D xwxqB8d6mFTAOhobX8cyJhsRq69aCktRwLzY+kP0Vdwn6ul2zIl744HQUdsnEns3W7 sd9NV3AC/MfWw== Date: Wed, 10 Feb 2021 16:29:00 +0000 (GMT) From: Peter Stephenson To: zsh-users@zsh.org Message-ID: <379883051.3731455.1612974540761@mail2.virginmedia.com> In-Reply-To: References: <52D5DA56-397F-40BB-BBA7-CE3BF7256581@larryv.me> <29a203d5-bf53-9cb7-7a49-2705c3b1d8f2@eastlink.ca> <87a6sc3d0c.fsf@lwm.klanderman.net> <752329601.3729797.1612972051119@mail2.virginmedia.com> Subject: Re: protect spaces and/or globs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev72 X-Originating-IP: 165.225.81.25 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfK4sXd/30Mlck3bg3sv0X8Uef2hiQ2qDMrKd+5KI60FPB/fYVSvB+vK1suDt2x5Dz/Dl8K6uPFnk58kd+O/DIq0uO83KKVkxRDcB0MLa1a/+4riDnwP2 7TdhpiymZZx9LBReG+EsYejdbXShSs+XjxnBgcyn8thR90fgqDUJ+zTaQvVDJ9ZO8ppZYXIM4RYAnESj9DRn6Y0MRUJSXLPouSYAqSx1DOBkqv2guZULCpwu X-Seq: 26496 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 10 February 2021 at 16:19 Ray Andrews wrote: > On 2021-02-10 7:47 a.m., Peter Stephenson wrote: > > > > No eval needed, the arguments are now exactly the correct command argum= ents. > > > If you look at this one case indeed no eval is needed, but in the=20 > broader context of the way all > my functions work, the eval is unavoidable.=C2=A0 Or is it?=C2=A0 Maybe n= ot. As always, that depends what you're actually doing, which is a superset of what you're telling us you're doing, but in general it shouldn't be a probl= em --- unless you know you need an extra set of expansions, it's possible to prepare the arguments you need in the array to be executed as a command line. What I mean is, the cases where this *wouldn't* work would be like this... fullargs=3D(some stuff '$to_be_expanded_later') So somewhere down the line you're going to assign to to_be_expanded_later, and you want that to be expanded when you execute the command line. *Now* you need the extra eval. But if you're not doing anything like that, you've just plain old command line arguments and no eval is needed. pws