From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25008 invoked by alias); 18 Apr 2018 09:36:58 -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: 42680 Received: (qmail 18110 invoked by uid 1010); 18 Apr 2018 09:36:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-yw0-f181.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.161.181):SA:0(-1.9/5.0):. Processed in 1.329219 secs); 18 Apr 2018 09:36:58 -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_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: lists@eitanadler.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=LcozQLC9WURR40pVY60h9KPk57M5+5HxHLNlvJtFJZY=; b=bQBm/qijapUbR4e4HmTvOlHQBWHIU/zI6COT7VfH8Y/8TLBGWmj01DjsZO6cRIxrM+ /FW4MR6f8R9WU8cgF2E6dLF/eIrjGLIMbSqs3YKoxgqM+OCTgMP6LsmAjLpz4RMCTfNB A7BoJnmnjtc0fFygYHQEnpqFqrGIaYKeHKXvc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=LcozQLC9WURR40pVY60h9KPk57M5+5HxHLNlvJtFJZY=; b=uI0Mzq2oFla6EX9BtoCZG8/QAfFSPLeHJMjRb5fIRHCQ68xuAKnCn7PV2sy6rqYAMy BZ7REjYPKnaYRBocvYKRhceuVZKGl4QGfa17u1bF6iyzTT1kH0YPsEInT4cEX9Aq7eJA AkZsidGxnzxLrjBqW+9xNCx2gRjNrtIMUmuuNRXdj2zad2K/1O3vA3dlQ0PGECjeMXuN W4PnAZAgILF0CDJkPyS9nwG9gVWuxl/HF6kKWzi9OLXRW90xp1escfygelIsyYQE2HwS f3wkv/tpHkq0bcomCunV3kYCqiRyudD26+uyULLGhA/YwSFDmqm+2cfuzmSiyXGbuqYy Ogag== X-Gm-Message-State: ALQs6tDynwZs7asowBtEgjuV9asXohDjOaP1qUGgXSGNagyzI4nCPn11 1MX0xj6mu8eW6m1fjWaKXePBwNJoMCPuyCGjirt/547y X-Google-Smtp-Source: AIpwx4/RG+G7KJWSV4LQ5Sa5rEtC+ux0pZ9MXiBc9SZq+/YE7PbVk6kq/rCCAEXyCEyFVmG+oWb2hLXYrltJIHGrH0Y= X-Received: by 2002:a81:af26:: with SMTP id n38-v6mr527137ywh.113.1524044214441; Wed, 18 Apr 2018 02:36:54 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <15398.1524043378@thecus> References: <20180416145913.wv637mfnw5hfe2fi@Daniels-MacBook-Air.local> <20180417125307.GA34493@CptOrmolo.darkstar> <15398.1524043378@thecus> From: Eitan Adler Date: Wed, 18 Apr 2018 02:36:23 -0700 Message-ID: Subject: Re: support more arguments to diff To: Oliver Kiddle Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 18 April 2018 at 02:22, Oliver Kiddle wrote: > Eitan Adler wrote: >> >> I'd also like to port this particular diff implementation to the othe= r >> >> BSDs, hence adding all of them to the case statement. >> > >> > I think it would be best to add the other cases as each BSD adopts >> > whichever diff. I generally try to update the completion to match >> > -current, so when a new release is picked up the options are correct. >> >> I also wonder if we could just get rid of the OS test and replace it >> with a pure version test. What if we run different verrsions than the >> default? > > Yes, detecting the version first is usually best. Arguably, this is what > we already do with $OSTYPE being a fallback; we have: > > _pick_variant -c $cmd gnu=3DGNU unix -v > > Does this new diff produce a helpful signature by which it can be > identified if run as diff -v Annoyingly no, but that seems easy to fix. =E2=88=B4diff -V diff: invalid option -- V > I'm not fond of the patch in the form that was posted. What about just adding FreeBSD then? > If you want a temporary workaround while using 12-CURRENT, I'd recommend > setting: _cmd_variant[diff]=3Dgnu I'll use that for now. --=20 Eitan Adler