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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,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 63CCE25C50 for ; Tue, 27 Feb 2024 22:12:35 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1709068355; b=VO3AElHoTQN8GB4itLJjq8uEXc1vlfZSri7Q/jX7lY9C5P20gh8xcLYPPwnb12D1X6YAEhFv1Y XVaAkT3GWZ/1PJIlOqX4zGIl6Xc8YwtX4aQVeN4k92NXZnKVStoIbQ3ZIkWZqi0+1Dhkx0C1VQ 6rQ/5/hjlRykrdHLliIJ6JNw1A5mgh62ETYuFG8SJE9SI4WJ/9JA1tsASWG3l65XOlL2N6cTyV bDUFw+YAKZJdIPsWHPDpm/pH19bcCfzP0BnA8UAUpKQ19TJv2MLRKQdcmku729mfGQmgLlEQzT OtHe9kG8jcEY+yZ/iys9KcMT1/zGHDuvmlgYq+3QGEFIxQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1709068355; bh=2XEYR9Ge2B75FY0anIsSuABZQzdfFoyT5Q9WRFtduLk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=kucIsnR2p8hSIln3xKE0/m3F+HKOFLDasHiTQqqQ5Q2cXT/kjYxMOSaG336pot5Jf1U/w394Np 0Xl4KW86S37M+xPF0OyvS1uBoeuzoCad/t63mFH4Bw9R7+KCD3YeTr/dTwQJ5eQ7rCZoFcmvYS /M1WhNX5b9V8aM/GFdC/EDT0vHiavftrhfboaPGGwOOgnOXhQSXXVw+218fTiM55K6jMHyvFcO mLWCkJlCqstg9NrleMSmxhrW8+bGpFjvM+rvN65yf7ZYgwwAdgueOg1UTi+Z1m9k+ahF/Ags9/ zrH3u/MtU5WMc6iQVnTYYWZY6X1lroUI4c2Thjaf5RgUPQ==; 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:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Y2S/ZdoTd4TbCUQ4DIG0GLchwSKYm8KRDgHNMoZaACA=; b=RMvez/IygWZnutkkj6S4GoEdZ/ uIAUgcjsuiUThlrbqP1NgyXbaFr1n1PEOo/D8YR9RbszEEe0/LxD650/DjfeEIkgx1phmb9+qieqi Nh2Yl4ay/llCMZZb/Mewp/iJdzNRnftNA+8eNYS3n2v1Z5QHyOchQ1STix1JWf1CMKIgZ9QxFgZlm yPm+GwwStNV17NAzIJ12ql9qbDivY50DUIGrd4RqX8F1W/cQHKdnX1yTb+46TkfYyq1EBWvpqMu2M j5dot9iItoXq/hudTGmMEcyU2lrnetLWX+CDX0V1PbbnFS1MjUdN2mP3TBiSGzo00wovWTLVIuEE5 +zonjZMA==; Received: by zero.zsh.org with local id 1rf4kd-000Aul-OJ; Tue, 27 Feb 2024 21:12:35 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f45.google.com ([209.85.218.45]:55524) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rf4kP-000AZm-89; Tue, 27 Feb 2024 21:12:22 +0000 Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a3e72ec566aso618467566b.2 for ; Tue, 27 Feb 2024 13:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1709068340; x=1709673140; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Y2S/ZdoTd4TbCUQ4DIG0GLchwSKYm8KRDgHNMoZaACA=; b=konB/IGv0jPoSVR9kJxaU1UC5CdRgbyQGcgT+Rqz1xgyXGT0hfmdxqFtadh27uZ/0o FyqBjBd612YPwr1W7FbfJ32OQICPS5hWOhHUIwBqVpKEb5F9f0PaZEz/6oyh/XqJOLlT uSS5fkZMtVk1KAwSeJzH3afCCpwWnOtBgeZKE6I84xWW+l0lT30GC03fGdajTgBQTKtH 3RoBoE4wNLtOmV5VmiLvMGGRyNyRskoK8RL1MlwShrof+NVRcd2NnGVV78sh5TGDnYUS BT3SF6ZnN229IsimbiYs/tQhqHpgT9cv+hWlLmgKCppHaNLxOY88EKiOkI7m/T59a2kC empw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709068340; x=1709673140; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y2S/ZdoTd4TbCUQ4DIG0GLchwSKYm8KRDgHNMoZaACA=; b=tG0Y6fQuvDcx7AVbvswwsAIcTYCT/MHXEe8TNJ3vwzMFfR5/FoDyJ+G+95TnZgdCbu RlSwAOAdwIXm7qalJVIyuMDoJY1pO6Qm036R40spj+98iVdsdk/qj5SMKKzVI8XrRC+o YmaXPSClya5pYdtTL7f1NpLtfcM1VIGgC8QWKiOCntcsxIqhqqzZPuPQ0Ssmuwe0gQLt MfhRxxC/OMtSBEt4KY1hFLnMSqF7pTqW/FG3Xy8LlOeBwcevBS7Ybha7G8saeonbEnrT eiq1kXINDwzKEZiMuVWQrP0ZcS2yX5XU1SQg5d0VCuZhQUqPQfeBsRRkNQZurcBzJZL1 DBTA== X-Gm-Message-State: AOJu0Yxmfh6X14y31moGhzMqbGoro1WZ65Z9PXSFeuLujB0FN1UVbqln HHVFjwemr6HQacPg7HT3Rrj0gLeaGIP9wPOZYkchxUp6taBVGZ5mg65WPMeJvfDiqRlVikKuQUc q1felLdVK1Yv5JkHp0ah47Vc4SJRLsw8WbohMObqCKlPUxgXteA== X-Google-Smtp-Source: AGHT+IGKoD5P6Wjua31KUn05S4vQH+y6M90Rf2uE+/i7p3rTLjyPuvLkYeaT1gvCpUI5SfQ1DTIC5DknHBeXXMSqsnc= X-Received: by 2002:a17:906:1988:b0:a43:a91b:829f with SMTP id g8-20020a170906198800b00a43a91b829fmr2133751ejd.64.1709068340559; Tue, 27 Feb 2024 13:12:20 -0800 (PST) MIME-Version: 1.0 References: <73696-1708812060.096751@IRYQ.G6d0.hkDI> <14804-1709061923.292710@qlv_.smDE.ovA0> In-Reply-To: <14804-1709061923.292710@qlv_.smDE.ovA0> From: Bart Schaefer Date: Tue, 27 Feb 2024 13:12:09 -0800 Message-ID: Subject: Re: PATCH: real-time signals support To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52625 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 Tue, Feb 27, 2024 at 11:25=E2=80=AFAM Oliver Kiddle wrote: > > Bart Schaefer wrote: > > Some suggestions RE -L: > > I'm not especially attached to any particular format here. If you or > someone else wants to change it I'm not going to object. I'm not strongly attached either, just used to seeing numbered lists go down the "page". > > * Drop the right-paren after the signal number, so this output is easil= y parsed. > > Is parsing kill -L output really that useful? I was thinking in terms of populating a hash-format of $signals given that the array-format default is probably not going away. With the paren after the numbers I ended up with: typeset -A sigs=3D( ${=3D${ printf "%d %s\n" ${=3D${ printf "(%s %s\n" ${=3D${ kill -L }} }} }} ) Anyway all of these were ideas that popped up as I was reading and thinking about using the output after applying the patch, keep or discard as preferred. > > * List in columns first rather than across rows. > > I normally prefer columns first but with the RT signals, I think I > actually prefer them at the bottom where they're easier to ignore. Fair enough. > > * Recognize terminal width and change number of columns. > > Ksh also does this. Not entirely to my taste on a wide terminal but I > usually like my terminal windows narrow and tall anyway. The main reason is for terminals narrower than 80-ish columns; wider ones, = meh. > > * Print one column (of number-name pairs, obviously) if output is not > > a terminal. > > We don't adjust output for non-terminals from any other builtin. Also reasonable. Fixable by asserting a COLUMNS=3D value if the width is recognized. > I couldn't see the point of the "SIG" prefix - adds no information but > makes it harder to spot particular values. Exactly; my point was that we're already not a perfect copy of bash/ksh here, so going further afield is not precluded. > A greater range of values appear to be open to shell functions but > otherwise, that sounds about right. There's also negative values. There would never be a useful negative exit status, would there? Negative signals translate into the absolute value sent to the process group leader, right? % (exit -2) % echo $? 254