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 15947 invoked from network); 24 Oct 2022 21:50:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Oct 2022 21:50:19 -0000 ARC-Seal: i=2; cv=pass; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666648219; b=kOIw+/59fKTU5G9HJCeimep6U6fRSIFNqlhFwIbxT6ViQFG35/XcO4yCMr2mCVa1oqmxsom2tT oKOLRqTDqEMiJct1INrNSEX/uOsY/mbjGWT6mmICtu7XoF4TnvbjmZEqIrraZg+JdiQdKTel0q 9QytGI0fm2D0/fC8uYxmiM8y30lOJuiAY8/wZHYx9PNkfSOgQYHXtIpBM0w5SYOuNSogvBMaAV PKzlab6PiV8tvDRzVi7T4nmOuEx/4FqlNc6bEHRE31AJz7kHQ/UD1n/vSqlluCWxvJ9W4Qppi/ yhLVXGEsWo5YJb+ipnjJGJkr+deDwTI+pFX4ZhaV0SQepQ==; ARC-Authentication-Results: i=2; zsh.org; iprev=pass (mail-mw2nam04on2049.outbound.protection.outlook.com) smtp.remote-ip=40.107.101.49; dkim=pass header.d=alum.mit.edu header.s=selector2 header.a=rsa-sha256; dmarc=none header.from=alum.mit.edu; arc=pass (i=1) header.s=arcselector9901 arc.oldest-pass=1 smtp.remote-ip=40.107.101.49 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1666648219; bh=OZAROXXD8rqiv/s5WiT7WNNt+bdMQakqZ61YXfqihSI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: DKIM-Signature:DKIM-Signature; b=O24egf31RRd+y0xMwy6i6ffXjoPUxUlYgaHiZi2R7rTB2Kp4GI6fypRteqjvhHP+383BqlptBZ THZX1ZVei6pMpbRnmxjTUw18DGCbgiYtwMSezjAlzM+q6jzfnmcZwPYZZu23Jbz0Jq52qiSRql a54o+gLjNVoIaqYT3VblDplfWXkhQcBEho37E1FUyl4Sixh3BYPUwvzhRf9VbWri1ZABHTthCO JUsVd9S4OMnA/Qa+oB2YYD/qj/LWHDWip6mivAdllnbMsDiua9a0UWp2DazLskNtYMqIkEyZPY IojtQO/9cjLVM6Ux/nyELIYKlfJi5JhhgoPUa+ekoadxmA==; 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-Type:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=xerEKjE4Ll6TaBpL3EvZON+OgeAC4NyUROO1X7nhcr8=; b=HrpPKLAFc/yAWGq8lgZs4mVd1V meX3O3qsrhDDtfsSZQj/xhmRSy6nmlQRUEiPP0vfwSOg4wBAqw/o7ZyYmw+8vezk2VF7+EN/LZ2uw cuXCCJI7tYyr/bbWZ+B6GWAfLl7qA45ExIvg7jH+Uhg4h5TcvlFMrpOkIE7JXusKCtA4qqZQDHM5s lAW9oDu3ZCb7AXWsDnj1SOtftZp0AqWc5yp+HHPqtPAAeVxtpTC2pzND1ISHh5FFzobuSAkAL8PN8 08lWcROVMcHgwiY1mqV+IMm5Nny8i81K0OYCCQ3tpD59/R3B5q3FIo0Tfpw5EDKyIN6K75keyRdr4 f9VK7eqQ==; Received: by zero.zsh.org with local id 1on5Ks-000J5M-1D; Mon, 24 Oct 2022 21:50:18 +0000 Authentication-Results: zsh.org; iprev=pass (mail-mw2nam04on2049.outbound.protection.outlook.com) smtp.remote-ip=40.107.101.49; dkim=pass header.d=alum.mit.edu header.s=selector2 header.a=rsa-sha256; dmarc=none header.from=alum.mit.edu; arc=pass (i=1) header.s=arcselector9901 arc.oldest-pass=1 smtp.remote-ip=40.107.101.49 Received: from mail-mw2nam04on2049.outbound.protection.outlook.com ([40.107.101.49]:36448 helo=NAM04-MW2-obe.outbound.protection.outlook.com) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1on5Ka-000Ij0-EN; Mon, 24 Oct 2022 21:50:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uz1XZogkCOZe5xJrdcz2B3jR5j4AGtswKbOJmzRqdGwTnWHLy1Euj6YMh0/HbKfSn2yr4+Of8HUu6Ic+qeBmXO/4543uIHklhKKUlf3hu82OroV9W07+pUv/H/3Q5yuU8YNbFKH6eYbOQMlbnaxwsI6+ySDhjQDhRtZ5DnMrO0az3q3hEb96Ql+5Jshkv97X0jZAW1Xo0K3u9yoE6V2llWWA9S5XwGYtc7olfFUa1Kh+zO3TSAkkiH4hp3X6LEIS5V4nN6hy7ObX0ii88p4I5wyaTgLsNCPexhsa/EL7p2114LHZ0Ynd2uIgeqlN+4fJwNmbmX6xQSwjEC4YAZP9XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xerEKjE4Ll6TaBpL3EvZON+OgeAC4NyUROO1X7nhcr8=; b=fOhj70WaXNp5C7nm1pBJ6NUHoRZy3tL/4VaElVmhV7zdW7QsGfoO1OIY1QeMB47KUMNxVzlLMXI0WEZ4+0r2+FHaIXugZhPKScDL9N8RoKmJydwk+KGbsN7LPmF50QzfDCXZMKP+6prBlAl6tG3fiNPwXa0N3mLAhkDkYmFvfij6NoZ70+i3Br/uWOES9IGkOPoAgK+Lbh5HKMIbuL9iYxds6Mlaz1+b2r5rOK5nwl10H9+W8suzW/W/mbFMTU1jUlzz0Znr5x2dENnoRI3un7P0aPvSTvOHivqWzAMn5L5Nv1PLBJp5HIJpz6YdRC5sjmZhHi7PhaZ1MZQCmnR8qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 18.7.68.33) smtp.rcpttodomain=alum.mit.edu smtp.mailfrom=alum.mit.edu; dmarc=pass (p=none sp=none pct=100) action=none header.from=alum.mit.edu; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alum.mit.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xerEKjE4Ll6TaBpL3EvZON+OgeAC4NyUROO1X7nhcr8=; b=GLwe9U2Xc/wnB6lQCZt0BWwwI9m0HHQYNaCSwUw/r+6ZZAI8UQSOGwrmgkhj++4eQ5MFzNSZVpoaf0lC+fsUq3kIUdgmDW55kssyryCfWiy6/93F2Z5T27BSejEV+AMZqzxoze5CyC1D3OW12kJCFb6qncCfOh5AlvpqM8qTIeQ= Received: from SN4PR0501CA0072.namprd05.prod.outlook.com (2603:10b6:803:41::49) by CH2PR12MB4955.namprd12.prod.outlook.com (2603:10b6:610:68::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Mon, 24 Oct 2022 21:49:56 +0000 Received: from SN1NAM02FT0064.eop-nam02.prod.protection.outlook.com (2603:10b6:803:41:cafe::df) by SN4PR0501CA0072.outlook.office365.com (2603:10b6:803:41::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.8 via Frontend Transport; Mon, 24 Oct 2022 21:49:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 18.7.68.33) smtp.mailfrom=alum.mit.edu; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=alum.mit.edu; Received-SPF: Pass (protection.outlook.com: domain of alum.mit.edu designates 18.7.68.33 as permitted sender) receiver=protection.outlook.com; client-ip=18.7.68.33; helo=outgoing-alum.mit.edu; pr=C Received: from outgoing-alum.mit.edu (18.7.68.33) by SN1NAM02FT0064.mail.protection.outlook.com (10.97.4.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 21:49:55 +0000 Received: from localhost ([73.61.13.155]) (authenticated bits=0) (User authenticated as jhawk@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.14.7/8.12.4) with ESMTP id 29OLnrOx028558 (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Oct 2022 17:49:54 -0400 Date: Mon, 24 Oct 2022 17:49:53 -0400 From: John Hawkinson To: zsh-workers@zsh.org Subject: Anonymous functions don't show up well in "jobs" builtin output, except Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1NAM02FT0064:EE_|CH2PR12MB4955:EE_ X-MS-Office365-Filtering-Correlation-Id: 5492b8ad-2b93-4792-40e4-08dab609b090 X-LD-Processed: 3326b102-c043-408b-a990-b89e477d582f,ExtAddr,ExtFwd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w7T/MRAY7HDW9SwS/odRfttQRKORSjMRlp2ga78559Y2JlDtW+Wlj9kLB5OW68pJGRSiVYf78B5/sRZHe4UImhCYGZP+G/SdhOp0uQfERef9aTEN8GP5gIWp22PzzKHrlX6zwL3gUZdheUMw7q9xbVciW5Bf6YTINUOQ4Oh5LqECKMysS7jOI2242RkAVEv4yFd85HcybspapFTZO2d8UBkTqZFk85KzZ6AYIWGpSHmgRN90T/YjOgvs0325HAvKrTW3u7bOjs4I/sraDCyJm9ZhND7gqWn7A+ip5YkDMqAmhfY4tBNiDshI96V+no2uLo69eMYrr9BhKiCs9uCOBfs8FRitGmmL6rnqSi3M/i0c4Cyvo4tTXB6o3c0UNQrAsEY0oj0jE+3baoseYIuQ6xMNegVv/UpoJdo6sMnbc2KWGxKwp8Oo2jErJHfACusu01JYa45sZl8wEGGx5Qkv3M/ILXyYxYItWpsN6frleMVzqRhY/2q7GZ9H7QZoR4WTU3lbktHl7JiB+TstoaU+IFtWrHB9Dnh2n8uuOG301DKgqHTynMIdmetbO+cPDjGxJ+DqjJN05VxLAkQUIwUN2IdMWxDqK64KU6D+CbQVXQJvhktVxw73V+1Lf0+rkzs5xYblNJRppX+SzS4wD7zbCXv8cEoj60qY+UmWhituFaLE4tWyiXNWnOqFjsbw3XAxY6uvsOdJn7PtVL6IUNR9yOEke1dgnQiSHUFLukxJUwfHvkFd3P1o9usGzU/uNcxigFCAqb5YusepUBtr/jj1uQ== X-Forefront-Antispam-Report: CIP:18.7.68.33;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:outgoing-alum.mit.edu;PTR:outgoing-alum.mit.edu;CAT:NONE;SFS:(13230022)(346002)(39860400002)(376002)(396003)(136003)(451199015)(46966006)(36840700001)(8676002)(75432002)(6916009)(70206006)(956004)(70586007)(36860700001)(186003)(5660300002)(316002)(40480700001)(336012)(86362001)(41300700001)(47076005)(2906002)(786003)(26005)(8936002)(9686003)(83380400001)(7596003)(478600001)(41320700001)(82740400003)(356005)(82310400005)(67856001);DIR:OUT;SFP:1101; X-OriginatorOrg: alum.mit.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 21:49:55.7520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5492b8ad-2b93-4792-40e4-08dab609b090 X-MS-Exchange-CrossTenant-Id: 3326b102-c043-408b-a990-b89e477d582f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3326b102-c043-408b-a990-b89e477d582f;Ip=[18.7.68.33];Helo=[outgoing-alum.mit.edu] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0064.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4955 X-Seq: 50837 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: Hi. 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. I'm not 100% sure this rises to the level of "bug," but it is a bit annoying and would be nice to have corrected. I saw this in zsh 5.8.1, but it reproduces in the git head (5b1c204c54e3ba41411e583ea649532b12977845): jhawk@lrr ~ % zsh-dev --version zsh 5.9.0.1-dev (arm-apple-darwin21.6.0) jhawk@lrr ~ % zsh-dev -f lrr% cat ^Z zsh: suspended cat lrr% ( cat; ) ^Z zsh: suspended ( cat; ) lrr% { cat; } ^Zzsh: suspended cat lrr% () { cat; } ^Z zsh: suspended lrr% jobs [1] suspended cat [2] suspended ( cat; ) [3] - suspended cat [5] + suspended lrr% () { cat; } & [6] 81263 lrr% [6] + suspended (tty input) () { ... } The suspension of the raw cat command ([1]), the subshell ([2]), and the list ([3]) all appear fine. But the anonymous function does not. Not clear what happened to [4] but I guess it is [5]. It's notable that the same command-line when backgrounded explicitly with & appears to show up reasonably ([6]), even though when suspended manually with ^Z ([5]), it did not. (There also seems to be something peculiar with respect to terminal settings getting screwed up in this process, where "reset" or "tput reset" or even cat[c to get back to normal. Not sure what's up with that, and I think that's not in scope for this bug report.) I have not attempted to craft a patch (or even inspect the code), but if it's helpful for your workflow I'm happy to do that. I am new to zsh development. (And honestly...almost new to zsh; back to it after a 28-year hiatus! Triggered by Apple, of course.) Thanks. -- jhawk@alum.mit.edu John Hawkinson