From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4374 invoked by alias); 18 Apr 2018 09:23:29 -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: 42679 Received: (qmail 15149 invoked by uid 1010); 18 Apr 2018 09:23:29 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net 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(205.235.26.22):SA:0(-1.4/5.0):. Processed in 15.10265 secs); 18 Apr 2018 09:23:29 -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.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=8Reb=HH=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1524043383; bh=OFwav/PjJf/3f5ZJMrDIlLXwV4Df/iWt442EYoOFdHE=; h=From:References:To:Subject:Date:From:Subject; b=ZsK5cKOaU+kSXkNlvXGF2ZtHWC4Fh6Y/m4QlHgw6ws9OcVSA+g4z4AmZmHvPD4iJqr64gpXVhiqeCA+wU6U1jwzX5NGtQLSe6zOuekh57Y+DGHTkj4FPTBbQlMOE4A08N4+TEhgAD1CYs12Quw+FhOlwoiYn9/uyX8LY46r7WJU2lpEyvIhc5GKO+FVJJQXAId0OQOv3H0x+SSAa8SHTxRAJnlD4fxexVekQAkQKWbTcSDlTya0eB3r2nnOgNzbC2iWPvJRFNZVC+IXvk+yvxxYaemKM3pXNLsrS7Vj0G10eCXkq9uV4Z/h/fq9jwx+lNuaTfQq81zHrGkjYZBGLyA== X-YMail-OSG: JVmBlgsVM1k2ozRBbfbq4.K4WO8Jeg5agEjbyI5SloWFDe0Cl3ogTTfajOFgfLY YiaqiVUL4_erPBWNxUKLUN2u7RCgmEQL.AC1IpKVnYxp0tBkhlfnWWSrdBRMLHxw7cY6HJ3y8uwx rpnDfpEJ1l1Dm6w3MsT6Q_Pk_cZ0lBygGOqGuwlWZpGGSerXXB8KIT1hSDCVZtrDI4l7vEKdvSH6 T6VfWFp4xijzCArHexTHaKLJF9sVxpSOR3RG5J5ammugmc1lxmtxzPeI.HWNsi2xdXmQ651QqEa0 9V77fV0OwQjjZ8.89wYvFJwY07WDrPqqA6DxcIKtWDrBXSjbIfe1C3lVKNBcSQBPERWcC_VssFtL z1Kyx_Whb5buOrSPYN8xQ29KiEgCMKD_DD0UiB.rC_i.wcpQfmIcTsGWhIjUNNrdxQvE3noUtokn MYLQh9PjBNBzWIH6_oJ6tPTyZLZSxZi9ntONp8r01tWuqLusIxFenUM7NNGyXZ1wd5w57o.in5Gy UXmv2cxN8vOXbLTwmzHvDY5Su.B2bL0gWUFWKKMbglh3JTDGSIdxXN6pw.cAS47nTuAJb030q7Hf oV_5rWBE- cc: Zsh hackers list In-reply-to: From: Oliver Kiddle References: <20180416145913.wv637mfnw5hfe2fi@Daniels-MacBook-Air.local> <20180417125307.GA34493@CptOrmolo.darkstar> To: Eitan Adler Subject: Re: support more arguments to diff MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15397.1524043378.1@thecus> Date: Wed, 18 Apr 2018 11:22:58 +0200 Message-ID: <15398.1524043378@thecus> Eitan Adler wrote: > >> I'd also like to port this particular diff implementation to the other > >> 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=GNU unix -v Does this new diff produce a helpful signature by which it can be identified if run as diff -v Of course this new diff may later diverge and we'll need $OSTYPE checks again. I'm not fond of the patch in the form that was posted. I agree with what Matthew Martin said - lets wait till each BSD actually adopts a new diff, at least into their unstable/CVS/whatever branch. And it'd be good not to obscure the valid OpenBSD diff handling just to get a few more options in. And GNU diff is probably closer anyway. If you want a temporary workaround while using 12-CURRENT, I'd recommend setting: _cmd_variant[diff]=gnu Oliver