From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 9625E264FE for ; Thu, 7 Mar 2024 08:03:15 +0100 (CET) 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:Subject:Cc:To:From:Date:References:In-Reply-To:Message-Id: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=qiU2hLTk9QUMFhhDysJfkK5PnIcvdwDJX1qzD1AjFHk=; b=Les/G7a5Ql0VvizHxcB2LJsZ8x 5AGqpMx0zpb2vEGAa+b/uvl08sI8PzoyZoj4RChtpEosOEmdYUJ10k6IH74k028EjgiiOQWtbH3YA iBEwOrl/SPTJ5cK4ZWyjc18e4uIx3aqt0PC6FZkwQWH/lCKbfKAFUOKFtnfcY7aZt0BsmSLqsxKmF OwuAcIiz5Q6ZO5UDDtmQz/nC9ESz7/EKkEzrfZZgTuh7Epn5kiV2CBmyrSYKPZKR1y0J/XwI9b8UQ rUwrOrxceNAoVrsKCKQPPP8nnoGokAiargpoNneL3OSIhNWzDP4FVk+jI7w8NH6xXUBKVMq4Aq+0j Thc61KAA==; Received: by zero.zsh.org with local id 1ri7md-0003qW-2T; Thu, 07 Mar 2024 07:03:15 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1ri7mM-0003XZ-8m; Thu, 07 Mar 2024 07:02:58 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfauth.nyi.internal (Postfix) with ESMTP id 3C8B01200043; Thu, 7 Mar 2024 02:02:57 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Thu, 07 Mar 2024 02:02:57 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledriedvgddutdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepnfgr fihrvghntggvucggvghljoiiqhhuvgiiuceolhgrrhhrhihvseiishhhrdhorhhgqeenuc ggtffrrghtthgvrhhnpeehgeeiudeigedvvdffvdegfeduudfgtedvtedttdefuddtjeev gfejgfevteehudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehlrghrrhihvhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidquddu hedukeejjedtgedqudduledvjeefkeehqdhlrghrrhihvheppeiishhhrdhorhhgsehfrg hsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 09B7D31A0065; Thu, 7 Mar 2024 02:02:56 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-251-g8332da0bf6-fm-20240305.001-g8332da0b MIME-Version: 1.0 Message-Id: In-Reply-To: References: <20240305065606.ccr2ieheahslcpye@chazelas.org> <20240306175711.t3uz2sery3b6tbjw@chazelas.org> Date: Thu, 07 Mar 2024 02:02:36 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Bart Schaefer" , "Mikael Magnusson" Cc: zsh-workers@zsh.org Subject: Re: [PATCH?] Nofork and removing newlines Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 52705 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Wed, Mar 6, 2024, at 11:53 PM, Bart Schaefer wrote: > On Wed, Mar 6, 2024 at 2:42=E2=80=AFPM Bart Schaefer wrote: >> >> On Wed, Mar 6, 2024 at 2:22=E2=80=AFPM Mikael Magnusson wrote: >> > >> > Is there some strong reason we could not allow ${(T) foo} btw? >> >> "{ " (curly bracket followed by space) is recognized like a syntax >> token. > > Code-wise, a sequence starting with ${ (with or without the space) and > ending with } is lexed into a single STRING token. (If it's inside > double quotes, the entire double-quoted thing is a STRING token, but > you can have nested quotes inside the dollar-brace inside the double > quotes, etc., so this has to work recursively, and so on.) So the > lexer has to decide when it sees dollar-brace how to find the closing > brace. Skipping over parameter flags before deciding to switch to > parsing something that looks like a function body might be possible, > but doesn't really fit into the structure of the lexer. Deciding > based on the very next character (space or pipe for a command, or any > other for a parameter) makes it tractable. Hm, would it be feasible to create an explicit LF-preserving form using a different character (e.g., ${&cmd})? If so, would it be undesirable for some other reason? (Sorry if you already said something ruling this out; I only had time to quickly skim today's messages.) --=20 vq