Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re[2]: strange "diff -u" completion
- X-seq: zsh-users 12214
- From: Vadim Zeitlin <vz-zsh@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re[2]: strange "diff -u" completion
- Date: Sat, 17 Nov 2007 22:15:54 +0100
- In-reply-to: <20071117182819.GA8932@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071117164132.335833B628A@xxxxxxxxxxxxxxxxxxx> <20071117182819.GA8932@xxxxxxx>
On Sat, 17 Nov 2007 19:28:19 +0100 Michal Politowski <mpol@xxxxxxxxxxxxxxxxxxx> wrote:
MP> > IMO this is wrong as "-u" behaves in exactly the same way as "-U".
MP> But does it?
I should have qualified it by "behaves in exactly the same way here",
sorry.
MP> Under Debian (sid):
MP> $ diff -u2 /dev/null /etc/profile
MP> diff: `-2' option is obsolete; use `-U 2'
MP> diff: Try `diff --help' for more information.
MP> zsh: exit 2 diff -u2 /dev/null /etc/profile
MP>
MP> $ diff --version
MP> diff (GNU diffutils) 2.8.1
Very interesting, thanks. I've tried it myself in an unstable chroot and,
unsurprisingly, I see the same thing. More interestingly, the version of
diff in Debian stable is 2.8.1 as well -- but it doesn't give the above
message and works just fine with "-u2".
I don't know how to explain the difference but, anyhow, it seems clear
that diff itself is moving away from using -uN so zsh completion is, in
principle, correct. It would be nice to have an option/style which could be
set to allow completing -uN too but I'm afraid I don't know how to do it
[easily] so I can't propose a patch for this.
In any case, thanks again for your explanation (although I remain curious
why did diff maintainers decide to deprecate this option... I'm so much
used to typing "diff -u2" that it's going to be hard to break this habit).
VZ
Messages sorted by:
Reverse Date,
Date,
Thread,
Author