Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH for _diff_options to allow argument to -u
- X-seq: zsh-workers 21179
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Ulrik Haugen <qha@xxxxxxxxxxxxxx>
- Subject: Re: PATCH for _diff_options to allow argument to -u
- Date: Mon, 25 Apr 2005 10:13:13 +0200
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <87is2i1o0e.fsf@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <87is2i1o0e.fsf@xxxxxxxxxxxxxxx>
On 19 Apr, Ulrik Haugen wrote:
> Hello!
>
> I recently discovered that you can control the amount of context that
> diff -u or -c gives you. Shortly thereafter it became very annoying
> that the zsh completion sees characters (other than other option
> characters) immediately following -u (or -c) as the original file name
> and thus won't complete the new file once you get as far as "diff -u0
> orig". The patch below makes the completion treat them the same way
> the option handling in diff does.
You should probably get used to using -U or --unified for specifying
lines of context. With diffutils 2.8.1 it works with -u but with
diffutils 2.8.4, I get this:
% diff -u0
diff: `-0' option is obsolete; use `-U 0'
The completion function is correct for the newer diffutils so I'll leave
the function as it is.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author