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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31312 invoked from network); 25 Oct 2022 08:24:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Oct 2022 08:24:30 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666686270; b=qq9H/jV88blm6L2QejXIvndy0+hZ+J61LiuUUoprPJ6rKBwkYJqvtklbyPwklyMFw7Gk5VWONP s827o4BxohoYoS+oBDyWe6pYA95HQd+SwSYLLhAOf3NY2aQz+pyHXOfHVYZlYd7Re7McAjq260 4FX1HeBEQcTRT6itvvUg31pzwrBU9cr8/E0EpAy04Yu+w0ZpPisyhmcaI+zy+AzVmxd0gAXYBE j6TV59YqOcoS46atIEvm21RAfPTe1rg/iObK811oMQt6E5dGRBQ1W+qpg+g6tfnPOqeGMNzcqd DoQo/0s5buI3olroXo8IIwl3oIa+KBcceoYWGP4DvGekOg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; 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-20210803; t=1666686270; bh=R4BMw0FivVzldGk6gjbRyhAglwHkhF7mXPRqW4wKoIM=; 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=hGui4mKmQeGuc0fTr5xWW4NV3if2bBHSGxlX2/S2Y1F6Q97I21U80S5XhhTEe8vRECpXh2z0Nc aUv7KkIISJlGqShqQ/fOna6HoGaoeH2dydOW1hFI8dUz7yWEqyV9EJEUuYW/WA5PCMmEKJe+cf Ex3VPmLOKbjTq7K1zPZBowC8CGrYi5mJk7+ywEIKdnrQjJfUPkGZAKuWwIJh/Sj9HLfu217o71 6cFlJHmLvTyrd45rAbGSg1CPHQokOtsFx1F4+JPRFEslr2PjxrKXk/akK2ZxVNBnb6HrUc7hnk OWsiXTrQNZx5NAAgxYxM7KCsVNYtZJTQocidsbrg/AyOHA==; 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: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=glbHlHn61pYJD44omQPT4jIvVksPe5ASvBs97yOnzA8=; b=VUbXo4t+bmdGYu/G5Iw4qgMSKF BQqesCA90Gn8vVtXzeEYJAjscQ7JlSTQ6lfJVwkgZb/7NmiH0l3aDrKFXHjN5M7J1F4sU8mWEDSQ1 na5g+CKSZRyt9MoLOwKrpFuDZRH/lJiKo8hC8E8SRzdER8+yJjLhcrCtlwcUGMSW8fFCLCR0xe/9J N2Utl4ywddomVOE1p3XeJyzYf+tcmFQm+UTGVP/8fCTEW1SyG9f71FK7HEl5Sgz+UOWDx6ImlhBZO MWEe6WNz28Eo6rwxppau9tP5DUqw5p/+ESm8qLpO45/3dJdPARccuQYVzevb1c3lGaAUPCUmCZ6Ab t3vEYqKw==; Received: by zero.zsh.org with local id 1onFEZ-0009SS-RY; Tue, 25 Oct 2022 08:24:27 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:39498) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1onFE0-00097H-Uz; Tue, 25 Oct 2022 08:23:53 +0000 Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net) by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1) (envelope-from ) id 1onFE0-0000X8-7Z for zsh-workers@zsh.org; Tue, 25 Oct 2022 10:23:52 +0200 Received: from oxbe9.tb.ukmail.iss.as9143.net ([172.25.160.140]) by smtp1.tb.ukmail.iss.as9143.net with ESMTP id nFE0o4EO0Vu5XnFE0os0Pz; Tue, 25 Oct 2022 10:23:52 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.140 X-CNFS-Analysis: v=2.4 cv=LNR1/ba9 c=1 sm=1 tr=0 ts=63579d18 cx=a_exe a=3Amxf2QPfMiVt6ICWsHjRQ==:117 a=1DWFKdCB1IcA:10 a=IkcTkHD0fZMA:10 a=ZjyAdWuDOD4A:10 a=9wM3FYGutLqvksJwIfMA:9 a=QEXdDO2ut3YA:10 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=1666686232; bh=R4BMw0FivVzldGk6gjbRyhAglwHkhF7mXPRqW4wKoIM=; h=Date:From:To:In-Reply-To:References:Subject; b=gqK3jeM0/vPjBvg30V5m/RwZpKgdoku0V3QeM5rbowGtzw/kLHWGTIGtCLYc5wqqm zcTASx8qF71c6MVZlfd616kbn4V034wkh/LgYWwgcMCQAH2W1luih647OR025a/5AF aP5brN/UrW+4XHRAkM+v4ufheSTUI7N73JAzOXQ8rFEBbK+LWlFQCd1/aoRNxdEjC5 v3dbYiztXrlD+lGzkNXrJMmWNzjezcmKUr+JHGggbFqIPLUYvPIFqBnTLOEmYN7Mev ltUxGRrAVtUFCGmP6mcyZ7alCwDGkpcWiBUkLUiZZ+4ofUSg4jbJ2BcCJEkmTKcthv AgCyOb3cloBAA== Date: Tue, 25 Oct 2022 09:23:52 +0100 (BST) From: Peter Stephenson To: John Hawkinson , zsh-workers@zsh.org Message-ID: <1521379922.3637327.1666686232149@mail.virginmedia.com> In-Reply-To: References: Subject: Re: Anonymous functions don't show up well in "jobs" builtin output, except MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer X-Originating-IP: 147.161.224.167 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfKZI2nV4NkP6C9ulb+dioY9oOMkFLEKogCT3p6exECEixfVeOsYGSGSN8lmRvNxtmdGEqhX6kgiNPQCZIX7Bk73Fh+hPNSoibLNM/lKuznb/nss+6PbM gGRBPgZ+islED+d4UWW0pcyXT2lGq4IvK3t3wMGiWYZ1CZr2Cy79IwGZgScBCu8jWGrp8nzeCjsOh0UE2Fg2aLt8a1Ie4+WIsJRN1c9gPAz0YKX+q66aW05n FvtDyWFBV3sK+Pm1QJ+zHg== X-Seq: 50838 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 24/10/2022 22:49 John Hawkinson wrote: I > recently had a use-case where I needed to use an anonymous function > shell one-liner to do some trickery with =() process substitution > persisting for multiple commands (That is, () { thing1 $1; thing2 $1 } > =(echo echo foo) ). I was surprised to find the resulting command was > not meaningfully represented in the jobs builtin output. > > lrr% () { cat; } > ^Z > zsh: suspended This is probably related to another continuing thread --- it's likely to be because the anonymous function was originally running in the current shell, and the entire shell was forked to continue running it in the background. This doesn't have the same job text a normal process would have --- both a straight "cat" and "( cat )" are running as separate processes from the start. It's probably possible to do better but quite how hard it's going to be dragging the job text round the houses I'm not sure. pws