From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19138 invoked from network); 25 Apr 2005 08:13:51 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Apr 2005 08:13:51 -0000 Received: (qmail 93194 invoked from network); 25 Apr 2005 08:13:45 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Apr 2005 08:13:45 -0000 Received: (qmail 19050 invoked by alias); 25 Apr 2005 08:13:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21179 Received: (qmail 19039 invoked from network); 25 Apr 2005 08:13:42 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Apr 2005 08:13:42 -0000 Received: (qmail 92913 invoked from network); 25 Apr 2005 08:13:42 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 25 Apr 2005 08:13:35 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-23.tower-36.messagelabs.com!1114416814!1272338!1 X-StarScan-Version: 5.4.11; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 20668 invoked from network); 25 Apr 2005 08:13:34 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-23.tower-36.messagelabs.com with SMTP; 25 Apr 2005 08:13:34 -0000 Received: from trentino.logica.co.uk ([158.234.142.59]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id j3P8DXZe001200; Mon, 25 Apr 2005 09:13:33 +0100 Received: from trentino.groupinfra.com (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 7DF0650CF7; Mon, 25 Apr 2005 10:13:13 +0200 (CEST) Cc: zsh-workers@sunsite.dk X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <87is2i1o0e.fsf@haugen.visit.se> From: Oliver Kiddle References: <87is2i1o0e.fsf@haugen.visit.se> To: Ulrik Haugen Subject: Re: PATCH for _diff_options to allow argument to -u Date: Mon, 25 Apr 2005 10:13:13 +0200 Message-ID: <7762.1114416793@trentino.groupinfra.com> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 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