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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 472 invoked from network); 20 Nov 2022 22:48:28 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Nov 2022 22:48:28 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668984508; b=gnDuNzoN6MRLTQauXsX57uSDkFgcWML6TgWAA99+CIbrvH9Y1MNK4Z2NptxvRK3RfxJ7HVGJmQ +kKQIBj3CGMWBbdvIyja90HfNy/y5oWW9oDpisFvKgsb6pEUpQb+5RzLenzQxQwUJ2yZ6IRWlA 2iCMTV1p3+ykwnpdgVc/bXASF69YfmowoECkvyBLoh/JoC0nRB/LevEevkuAWi094HYbukGHRQ xlv/Dat38rg55XNalLHzR7v0nHuXOrR0x2pqlXCtTil07VA1sgu9gi5Q6+xwIUvOFeGu0fQVrp SNkVQJzdI+cem2ZLEqY1R87SJ6jc0jSt7FjQn3m6zSa3Tg==; 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-20210803; t=1668984508; bh=5sAcAgZkInZ7TmDO/swo29kZwtNZNr0al6T6le3UGQ4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=qD5uHg1+wdSzqH7kZXmPOxskcMpDurSjhItOzSGecs/4Pv2mbAV+Fkyu89kwdrLBcTFrSjg1vv JjfcErygX9k7kgE/E3UTH49+DlIsi/2Vu5e5ggcUyDVRr4k4zSTND3pdOMY3I8h13svMG66rfK offeBJ5v1BcmdBIqq5C9mht7gaytcYa6HE1MEYov14/Y6BJxmuupBveXPRf/c3h8EqGGUZrYa3 xP7iBQfDEfIwlGW2K1KahGV7+3umz5c5ydy2LDovhEHL5Xhyan0pujVn/SKrvh27a/qaDFrASn GV+r/jsNZw6UciqkFnatCRWqyY+cvzb32u7PkT9DNJdyHw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:From:References:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Eem6pD7dY3WvjZ6pppcAS9dklkVrlUA+4iMQo5FVSjE=; b=D3NU0nuZLwjrLsbPRMVfNJgnbX EJGlCbvmnRDxx8tiBZ+2GeNPShR9x9WqQHCTlWHOx9WfXI0R4wVq+8j0xJO4Iqe83pElLdUJpEyH+ W7Ar4mCSFQTdMU15XdEDGLA4jmZ944SvjWtlcxtr+9V3m0yUYRpSo3aoKz7Ju7kTDlGJ97JDxlk+w BGyY5dhaI287TqVsEVV9FgExGesUZxs3GcNHW14b0mOojplqoJ8QYbqGX8Wf+xOR2RMOHWz7ZYz7n 6oAqbW4pric+ONF13wts59qGZA/iv3vM77in/0TzPWEjdoLhldOwCuj6291MrTSv+UZ8AuUhivR+J z6jrdBXQ==; Received: by zero.zsh.org with local id 1owt6y-000F0B-6x; Sun, 20 Nov 2022 22:48:28 +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]:54237) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1owt6M-000EHJ-Uu; Sun, 20 Nov 2022 22:47:52 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RLO00GUK4JUZYI0@mta02.eastlink.ca> for zsh-users@zsh.org; Sun, 20 Nov 2022 18:47:49 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id wt6LoRJeNkffJwt6Loxwta; Sun, 20 Nov 2022 18:47:49 -0400 X-Authority-Analysis: v=2.4 cv=Lbf6qBTi c=1 sm=1 tr=0 ts=637aae95 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=ohmANg7KUd6luWqB8HQA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrheeggddugeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Sun, 20 Nov 2022 14:47:48 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: why is eval needed? Content-language: en-US To: zsh-users@zsh.org References: <20221119164852.hwujmufa6hn5lotr@chazelas.org> <352823cc-954a-fa79-d830-d69d593b1c02@eastlink.ca> <3fa3f7ff-1733-4730-a62f-dd0e138c3b72@app.fastmail.com> <20221120085519.szudhyg5ewrw3b4o@chazelas.org> <20221120150848.74di3mpjwnfcul34@chazelas.org> <20221120201659.na4ypuivspeoowhu@chazelas.org> From: Ray Andrews In-reply-to: <20221120201659.na4ypuivspeoowhu@chazelas.org> Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28425 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: On 2022-11-20 12:16, Stephane Chazelas wrote: > >> But that's the thing, I'd naively thought the variable could be inserted in >> the command string and be 'just' a string of characters, but zsh imposes >> that 'tree' must see '-L 2' as a single entity, yes? > No, you have it completely backwards. But everything so far seems to tell me that I'm right.  When '-L 2' is presented as two arguments instead of one, everything is fine. Are we miscommunicating? > And I think at the heart > of your misunderstanding there is the misconception that you > pass a "command string" to an executable. > > You do not, you pass a list of arguments. > I know, but at least on the command line one can think of it as a string.  I understand that it it will be parsed as 'words' (including spaces if quoted). > > Why store those two arguments as a string with a space in between them > and then ask the shell to split it, that makes no sense. I know that now.  But as we discussed, the normal thing is for a switch to present as a single argument so that's what I did.  I quite understand the mistake NOW. > (¹ a complication and a spanner in the works is that environment > variables (those VAR=value strings passed in envp[] above) are > string/scalar only; in csh and in the Bourne shell, shell variables and > env variables were more separated than they are in modern shells). Awesome that you can keep all this stuff in memory and not get your wires crossed. > > What about: > > files=( > 'my file.txt' > 'my other file.txt' > ) > rm -- $files > > Should they be split too? No, I understand that well.  I think this is a closed issue, I think I'm quite content. > Ah!  So my little issue is a zsh exclusive? > No, again, any recent shell Ok, not 'exclusive' but it's been a point of difference between at least zsh and bash. > No, it's not tree being difficult. In any command doing Bbbbut we've agreed that tree is being difficult!  You've explained it in great detail. > apt-file is your friend. So it is! > Will tell you what package the tree command comes from. > > apt showsrc that-package It's just not something I need to worry about.  To me it's all 'Linux'.  Maybe one day I'll download some sources (if in C) and start tinkering.  For now it just doesn't matter.   The thing is to get a bit more competent with zsh.