From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23 invoked by alias); 2 Jul 2018 15:52:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43134 Received: (qmail 9315 invoked by uid 1010); 2 Jul 2018 15:52:44 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.214.41):SA:0(-1.9/5.0):. Processed in 1.32017 secs); 02 Jul 2018 15:52:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_PASS,T_DKIMWL_WL_MED,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=5tWXxo40HcgfsK6wxv0bgppauywlHPHJWSNZkG8wrpo=; b=WuAvYsSRdci8Dh7/2Nc9/UqpelfvAveP7dAKpdLDbLiRZFUWERWbl/i4P5HCJ4Ft8X HgqlEIk/IcX0h/4562Pm8oGifClpVAestTF1aqRdiKPZ+QdNVW/1Xj5IoWkUJ52kwcvl o72bfip94jIpU2PfNFV69pRx2I5ZV6RiLLh+2hKKcWchHOICl+AH3WIKzFsTqBnOAZjf khV6cIGkqh+OwGVRfCiQ9GsjlvGb3jbvxAUDc9p/H1pO08tUNdWxYut4C1AZsanNej/E GwW6N1Bu4HMGT2Y90s1kS/CbJwQxrWAf/N23XxR3kTGZPG66I5kLYK+TA7dxpWfR44tc 8F0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=5tWXxo40HcgfsK6wxv0bgppauywlHPHJWSNZkG8wrpo=; b=dICV+i86JCzEnVxS/pQtwSd0gm2a2JoWJC0nxnW06VbpgSFlv0XtA76X6LiP/QIaIU OzOg9IDja6yy92dTQ/3ag7zaDdFH3r2HfTC3NNPzalLIgeQvQVnKseFgrsNmiLYb28DY tHZ+mNWKkK+Y6mJe7r/4qTlWXunO/yvw+r6SKsGORzURYUxMmr5PZw1d0I3yEnDk2Ibc hdvExPTP5W8nur0eeyF9tkHuaoIYEPaxtuQEdDtsVCCIisxfXyMLMX2AnYhzu9xUJjok y/Cbz/4gRNhE7/6VgkN072hDxdcSALH0IhUPnVu/CfJXQjvQa8eOoaZvtrhjJ0sIQFEZ UP7w== X-Gm-Message-State: APt69E0kAkruJsrMn6+OEW3SYOoOsRm69wflnMD/7fEigS7S8YJjqweP gQ06ICKgiXiNFu4F0zN1EPtuaRG4xPE= X-Google-Smtp-Source: AAOMgpcNXOSadMA9hMXkjyQ6CkT/5a1f4okSLFny0PanXpoTtBR2XOU3NUonWoWo6VFqT/8o0oar1g== X-Received: by 2002:a24:2e4a:: with SMTP id i71-v6mr3903975ita.69.1530546760114; Mon, 02 Jul 2018 08:52:40 -0700 (PDT) From: dana Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: [PATCH] Completion: Don't prepend SIG to numeric signals in _signals Message-Id: Date: Mon, 2 Jul 2018 10:52:38 -0500 To: Zsh workers X-Mailer: Apple Mail (2.3445.6.18) On the subject of _signals, an issue i noticed is that sometimes zsh = doesn't have the symbolic name for all signals.* `_signals -s` doesn't account = for this, and produces weird results like 'SIG16'. Technically most tools that = deal with signals will accept these, since they just blindly strip off the 'SIG' = and use whatever's left over, but it's weird and AFAIK any support for them is incidental and undocumented. I think they should be filtered out. * Ubuntu's zsh 5.4 is missing symbolic names for SIGSTKFLT and SIGPWR. = If i build from source, they're there, and the scripts that generate the = signals basically haven't changed in 20 years... so i'm not sure what's up = with that. Maybe the system that Ubuntu used to build zsh had weird headers. PS: I noticed that zsh doesn't even *know* about SIGRTMIN through = SIGRTMAX (they're neither listed in $signals nor accepted by kill), probably = because they're defined weirdly in the headers. bash and procps both do, though `/bin/kill -l` doesn't show them. I might see if they're easy to add. dana diff --git a/Completion/Unix/Type/_signals = b/Completion/Unix/Type/_signals index df9a2f339..ffb01eba0 100644 --- a/Completion/Unix/Type/_signals +++ b/Completion/Unix/Type/_signals @@ -36,7 +36,7 @@ if [[ -z "$minus" ]] || fi =20 if [[ -n "$pre" && $PREFIX =3D ${minus}S* ]]; then - sigs=3D( "${minus}SIG${(@)^signals[first,last]}" ) + sigs=3D( "${minus}SIG${(@)^${(@)signals[first,last]:#<->}}" ) (( $#disp )) && tmp=3D( "$tmp[@]" "${(@)signals[first,last]}" ) else sigs=3D()