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 14008 invoked from network); 19 Nov 2022 22:22:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Nov 2022 22:22:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668896534; b=L9RK+BNp/huZQzllxYmZnEvUAyCfWEvJCKG4Hhh4579vKKvZbdJ/UJXj+XhFT8pg04gYHJW7ul JPUYgIu11Rm7U/dQB5XI7AljDlchvTdZ8aO2X9d0XYgWErpa4t9Rdlny2HOLCfKAXO142F7Hdy aB+k3NC6rj89vKEApJwiqmjD/HFDjZML8PTEUtPa33afCf6daXCOIGCDtMwsTUW+yCOPQkpJHO n20hFI2j7j8W/nmVI2MqRzWxPRHDybPfFJxWXs4p8fzgg1pKJzp+SvLAymkdayVFTWDW0xLfjY Tpmg0WoC6g+02wB0Jm8/1mFMvrIUM9nzbtBLwJcE+dP+ww==; 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=1668896534; bh=QCHQxug33KSp8kHo0YMbj1zSHYACMxnBiPCGfWRQx5w=; 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=ouefTlAPgcNTeEcM+L+ZM63tzuOLENdoE4kILQQxLJKlZx45wPs95P6Qt8rFfm85K0pMpbqfVl 1U4eYJe+a7ePXrF6FtJp3P6v3DVt3pt+rbYPJ/w2iIoySqcMwPAY2iaHUKb/Ofy/0rnkRwrpNO Pg9BqDEydeHF84pQ3aSaaQNPdwBaxjaYwi+U8CjX9vugNnjFCb61vXNHGgYv9suWUTioKOSAnZ FPX6db8E5f/Ut05e/DUIVZ8iiga6PXkfST/JxcFSEUm6BjZKBxrq8I4hVqTFPC0hFJIDZTEdDH s2lY5lBm2Au4lEc8q2tvgWVjm1WIjv/aI8RcieNNv3U1YQ==; 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=yiZXrDGNsrvCrimKPHOXLDNXfva4zIDWHHzpHk3yqZI=; b=WfonX5Hq+ckxfsWWE6GJUYp1Iw E9RoDuxoST+NR+aAxquX2ds3PsbA4TI5UVaywOFZ3qU5jDg+PcLVpRaHSproJk4JU7fvGcJw8gn1r fp+biRR4dvZQm35F3kLEZTddRcSYHfk7puFJQTjn28Br408t1Lq6NQx/XhcnvX0eLo05kskN2KiZw o+o7bFVVnCLBT4SPveRaeoSDHnrseFzPl6YaHWOIoPhSGPJnvCk4+xOfTzBTYDp/V5ohVsKix5UCz 0y6pYGB3JKiti3lSEj0KiR9yf04kb0UK7HMuvo6BzRz37uznajjKZltWsSVfelkbGHUqkj4kwg6AI MMU1fRzw==; Received: by zero.zsh.org with local id 1owWE1-000Jaa-Hm; Sat, 19 Nov 2022 22:22:13 +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]:59009) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1owWDQ-000ItH-7F; Sat, 19 Nov 2022 22:21:36 +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 <0RLM00FU78K05ZT0@mta02.eastlink.ca> for zsh-users@zsh.org; Sat, 19 Nov 2022 18:21:33 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id wWDMoOBa1kffJwWDNoxaO5; Sat, 19 Nov 2022 18:21:33 -0400 X-Authority-Analysis: v=2.4 cv=Lbf6qBTi c=1 sm=1 tr=0 ts=637956ed a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=LQJS_Z9C_j7_M4FiEP4A:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrhedvgdduieefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Sat, 19 Nov 2022 14:21:32 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.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> From: Ray Andrews In-reply-to: <3fa3f7ff-1733-4730-a62f-dd0e138c3b72@app.fastmail.com> Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28418 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-19 11:50, Lawrence Velázquez wrote: > > A "single argument" is not intuitive at all. You would not run > > tree '-L 2' > > or > > tree -L\ 2 > > so it does not make any sense to think that "tree" wants a single > argument there. Intuition is subjective.  Besides, usually such switches don't demand a space IIRC and it really is actually one argument, this is an exception. Even if the space is demanded, one might still think of a switch as a single semantic instruction even if it must be syntactically two words.  A filename with a space in it is NOT broken in half, it's still one entity, so I'm thinking the same way.  I myself was naively thinking of it as nothing more than a string of four characters to be dropped into another string of characters -- as simple as that.  As if it was the command line. But commands do have their need to group characters into arguments so the invisible rules must be followed.  ' -L 2 ' must be invisibly broken in half.  Which, interestingly 'eval' seems to do automatically.  It's a huge thing coming to understand that what to me might look like 'just' a string of characters, to a command, needs to be viewed differently.  Once I understand that, things get much simpler.  I guess internally zsh must have all sorts of meta data attached to arrays to keep track of what's joined/split to/from what else.  It would be cool to be able to somehow see this invisible stuff, some way to see the invisible structure of a command line.  But I'll be ready the next time something like this crops up.