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 28523 invoked from network); 16 May 2021 16:23:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 May 2021 16:23:10 -0000 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: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=xAJCMrqb+EujvWHNp8lvbxW76vMd8xjkf6mLX8OGN4k=; b=kLuqOy4Q89NBBDoLtJnDO1v4Au eD308gP+KLpyMyNh4KH11fHW/dyIXwHvTLs9QfgNda7bq0yr7lwV82GArDhlTjwjIGSlUPlOdVT2t TeeZ2vIYq/FmX46oPdtpBHPokt9jVokgPsiSXY6mXeKqKE+IpBeaI5Xw46XsveY8StCSTv5CN4Xlc 8qex9XAFQyuwWUSmlj1CmWO8cTunhrQgeKfmmxizOn1uxVw5VtQQUmPjDqWO96TVm/I6EvjTxfmj+ s+o8lgVQSGUNW8YoLztkPYch1TUoSkj+FEu5zWIjgTlvm8g8w4/qnoAmgKP9pz+OZKRpRCzIT83CK Klzuu0/A==; Received: from authenticated user by zero.zsh.org with local id 1liJXq-0000bJ-Cw; Sun, 16 May 2021 16:23:10 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1liJXc-0000Hw-Te; Sun, 16 May 2021 16:22:57 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 980E627C0054; Sun, 16 May 2021 12:22:55 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute1.internal (MEProxy); Sun, 16 May 2021 12:22:55 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeifedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnrgif rhgvnhgtvggpgggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecugg ftrfgrthhtvghrnhepueefheelieekieejtdfggfetheehiedvtdeiudekjedvjefgjedu feekveelgfegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheplhgrrhhrhihvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeh udekjeejtdegqdduudelvdejfeekhedqlhgrrhhrhihvpeepiihshhdrohhrghesfhgrsh htmhgrihhlrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id DCC9BA00079; Sun, 16 May 2021 12:22:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-448-gae190416c7-fm-20210505.004-gae190416 Mime-Version: 1.0 Message-Id: In-Reply-To: References: Date: Sun, 16 May 2021 12:22:34 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Mikael Magnusson" , "Bart Schaefer" Cc: "Arseny Maslennikov" , zsh-workers@zsh.org Subject: Re: 'while do done' hangs interactive zsh Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 48844 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 Sun, May 16, 2021, at 12:15 PM, Mikael Magnusson wrote: > On 5/16/21, Bart Schaefer wrote: > > The attached makes both "while do" and "do done" into parse errors; = I > > didn't want to try messing with the tokenizer, so better solutions a= re > > welcome. >=20 > I use "do done" in production code so you can't remove that. I could > imagine someone using "while do" too, but I don't so I won't complain > about that part :). It is faster to not run the builtin "true" than it= > is to run it, and it has been valid syntax all these years. It seems to agree with zshmisc(1) as well (a na=C3=AFve reading of it, a= t least): A list is a sequence of zero or more sublists, in which each subl= ist is terminated by `;', `&', `&|', `&!', or a newline. [...] while list do list done Execute the do list as long as the while list returns a ze= ro exit status. --=20 vq