Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: support more arguments to diff
- X-seq: zsh-workers 42679
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Eitan Adler <lists@xxxxxxxxxxxxxx>
- Subject: Re: support more arguments to diff
- Date: Wed, 18 Apr 2018 11:22:58 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <CAF6rxgnKzGGbRiBYqWZ_8rApFM_8xKjB9A+_3j9PDk9skPTuFQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAF6rxgmh+N8VdjzN-jGA4QHPJANLkMJ-JZXChb-28DZxxLVa7Q@mail.gmail.com> <20180416145913.wv637mfnw5hfe2fi@Daniels-MacBook-Air.local> <CAF6rxgkmqUbAivhR6c3=RK4U_F2gY3ybebAjLgBnuqSmCyneeQ@mail.gmail.com> <20180417125307.GA34493@CptOrmolo.darkstar> <CAF6rxgnKzGGbRiBYqWZ_8rApFM_8xKjB9A+_3j9PDk9skPTuFQ@mail.gmail.com>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author