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

Re: strange "diff -u" completion



On Sat, 17 Nov 2007 17:36:20 +0100, Vadim Zeitlin wrote:
>  Using zsh 4.3.2 under both Debian Linux and Cygwin trying to complete the
> command line after entering "diff -u2 oldfile" results in options being
> completed, not "new file". This is because in the file
> /usr/share/zsh/4.3.2/functions/Completion/Unix/_diff_options the "-u"
> option is explicitly treated differently from "-U" and "--unified" which
> are defined, in the list of options passed to _arguments, as taking an
> optional parameter, but "-u" isn't. IMO this is wrong as "-u" behaves in
> exactly the same way as "-U".

But does it?
Under Debian (sid):
$ diff -u2 /dev/null /etc/profile
diff: `-2' option is obsolete; use `-U 2'
diff: Try `diff --help' for more information.
zsh: exit 2     diff -u2 /dev/null /etc/profile

$ diff --version                          
diff (GNU diffutils) 2.8.1

-- 
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.



Messages sorted by: Reverse Date, Date, Thread, Author