From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9655 invoked by alias); 6 Jan 2018 00:28:52 -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: 42236 Received: (qmail 5657 invoked by uid 1010); 6 Jan 2018 00:28:52 -0000 X-Qmail-Scanner-Diagnostics: from mail-io0-f182.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.223.182):SA:0(-1.9/5.0):. Processed in 10.832424 secs); 06 Jan 2018 00:28:52 -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,SPF_PASS, 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=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hepcI3wdjMbzw2cNjPmmpyxp3nSxD7TStc2CDi/LmLw=; b=wPxq/viQcyg7G0r7n0RX57C6SxDL2cFoPmD0Kl2RWF12qhnaqWYIyDMcuaLW+LsbE5 hi5ZxMoJwT9dHfnZbkiP5ktVmkk9e+HksY1UNTAcWnrpgkPCx+r9ZmX3mSrM8awgUfdK GVdPluGjWMTBJ6NhbW1nIjJsc1cEj9KYWr5fMsTV1zvervmO0Q7iEyXY6VbBA/B9QEZO 8XuL71gQa4MlTG6YcNzYtKvQkNPZsxlVARSz5pGd32tk3ZVz2B/5XydOnAmGnv0G084b 6dBMOX3YRL7WR+FWzqH5fCVwy9luzFZhIBfYUj5xdzoU7l+ftsvt6n8ocSm1i4Cg1UWw QF+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hepcI3wdjMbzw2cNjPmmpyxp3nSxD7TStc2CDi/LmLw=; b=kNHHhA20CZPv8Sd8GnbUK0M605LVI71R1R+a6G6cdfAPVSKY0VOMOAzftkVWCfVo1u lEP0Ky4CQtSEhmSemVuh7IVZamvtpYp41PuABhPvO5FtaphSRqhg8xLG1oXlMqdNyce+ 2sj2y6/WzTFUFg4Z9tr+R6Vkm/K/EZzjBx3PvhLmrNNM5f1rXfV4oGjN8g7MCnSpjINL fui3l6lTPdg9xaeJfcSo2pcHJpHJUaqT9KlsOSFEc1DIB5vyQwnOoyWbc1SdpwEOotnl 98VhHFkwGILFZN0T847+oKnvVHCL7sBdaGDaHCiKL7Ac4FSJgrD4cXx5k2OlDPTz9PAo gNzw== X-Gm-Message-State: AKwxytcW0Re1hA3tijha/0Kad/AMu6/s4ZPGaOnkMd6PFL4J+A0AYpEF ABuOkeBsJUdnBchZWU6qDKNazQ== X-Google-Smtp-Source: ACJfBot8PWTdKH5VsHoSSe2ysvywjdp8np9OjYpBlqUwDjdkpxUwQbDpz+7a76iJ5qShOKInQzGPTg== X-Received: by 10.107.147.11 with SMTP id v11mr4891379iod.303.1515198518324; Fri, 05 Jan 2018 16:28:38 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] Completion batch #5: Simple Darwin and Linux utilities From: dana In-Reply-To: <26360.1515196233@thecus.kiddle.eu> Date: Fri, 5 Jan 2018 18:28:35 -0600 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <1BCD7B33-7A90-4877-9CFE-A89B3844178B@dana.is> References: <4553C21B-67DD-4E1C-BE56-F662E63F7FF5@dana.is> <26360.1515196233@thecus.kiddle.eu> To: Oliver Kiddle X-Mailer: Apple Mail (2.3273) On 5 Jan 2018, at 17:50, Oliver Kiddle wrote: >That is with the exception of Linux/Command/_ldd =E2=80=93 there's = already a >completion for ldd in Unix/Command that also handles Solaris and the >BSDs. Oops, i didn't see that. I'd just assumed it was missing because it's = actually broken =E2=80=94 at least it is on Ubuntu Xenial. Here is a fix for = that: diff --git a/Completion/Unix/Command/_ldd b/Completion/Unix/Command/_ldd index 19b8a9105..1de1659a5 100644 --- a/Completion/Unix/Command/_ldd +++ b/Completion/Unix/Command/_ldd @@ -1,6 +1,6 @@ #compdef ldd =20 -if _pick_variant gnu=3D'(GNU|EGLIBC|Gentoo)' unix --version; then +if _pick_variant gnu=3D'(Free Soft|GNU|EGLIBC|Gentoo)' unix --version; = then args=3D( '(- *)--version[display version information]' '(- *)--help[display help information]' (Changing 'EGLIBC' to just 'GLIBC' would also do it.) On 5 Jan 2018, at 17:50, Oliver Kiddle wrote: >It is also better >in general to use $words[1] instead of $service in case a command is >specified by the user with a full path and there's another version of >the command elsewhere in $PATH. Ah, that makes sense in hind sight. Would you like a patch to fix the _call_program and $service stuff you mentioned? On 5 Jan 2018, at 17:50, Oliver Kiddle wrote: >The idea is that when looking up styles with zstyle, this should be >included. Unlike _wanted, _alternative, _tags and others, this can't be >passed on to _values other than in $curcontext. So in this case, using >_arguments -C might be better. Is there any case where -C is actually *undesirable*? I'd asked myself = earlier why it isn't simply the default, and i decided that maybe it was for = backwards compatibility with functions/styles that existed before -C was added...? On 5 Jan 2018, at 17:50, Oliver Kiddle wrote: >Can you elaborate on what doesn't work here? The command doesn't want to take a host name (and so i don't want to = complete one) unless -r has been given. But it's also valid to give it as -rW or = -Wr, and i found that if i tried to give -r its own set the completion system = failed to 'detect' that i was in it when i provided the options stacked like that. = In other words, assuming i have a set for -r and friends: % scutil -r # completes only args from the -r set, as expected % scutil -rW # erroneously completes args from other sets After some research i found workers/33249, which i assume (?) is = related: http://www.zsh.org/mla/workers/2014/msg01037.html On 5 Jan 2018, at 17:50, Oliver Kiddle wrote: >Sets have some oddities and >are often better avoided. Yeah, that's the conclusion i came to as well...