Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: support more arguments to diff



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