From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4642 invoked from network); 25 Mar 2004 17:00:56 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Mar 2004 17:00:56 -0000 Received: (qmail 20736 invoked by alias); 25 Mar 2004 16:59:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19691 Received: (qmail 20714 invoked from network); 25 Mar 2004 16:59:35 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 25 Mar 2004 16:59:35 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 25 Mar 2004 16:59:35 -0000 Received: (qmail 23825 invoked from network); 25 Mar 2004 16:59:34 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 25 Mar 2004 16:59:33 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 4F61F70037; Thu, 25 Mar 2004 11:59:05 -0500 (EST) Date: Thu, 25 Mar 2004 11:59:05 -0500 From: Clint Adams To: Joey Hess , 239975@bugs.debian.org Cc: zsh-workers@sunsite.dk Subject: PATCH: Re: Bug#239975: diff tab completion broken for second dir Message-ID: <20040325165905.GA8707@scowler.net> References: <20040325041020.GA826@kitenet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040325041020.GA826@kitenet.net> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 > joey:~>mkdir a b > joey:~>diff --exclude=foo --exclude=bar -ur a > --exclude-from -X -- exclude files matching pattern in file > --expand-tabs -t -- expand tabs to spaces > --forward-ed -- output a reversed ed script > --from-file -- compare specified file to all operands > > For some reason if there are two --exclude's on the command line, it gets > confused, and doesn't realize that the second non-option argument is supposed > to be a file/directory. That's because the diff completion doesn't know that you can use -x/--exclude more than once. I wonder if this is the only option mis-specified thusly. Index: Completion/Unix/Type/_diff_options =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_diff_options,v retrieving revision 1.7 diff -u -r1.7 _diff_options --- Completion/Unix/Type/_diff_options 14 Nov 2003 11:56:56 -0000 1.7 +++ Completion/Unix/Type/_diff_options 25 Mar 2004 16:45:27 -0000 @@ -90,7 +90,7 @@ '(-N --new-file)'{-N,--new-file}'[treat absent files as empty]' \ '(-P --unidirectional-new-file)'{-P,--unidirectional-new-file}'[treat absent first files as empty]' \ '(-s --report-identical-files)'{-s,--report-identical-files}'[report when two files are the same]' \ - '(-x --exclude)'{-x+,--exclude=}'[exclude files matching pattern]:exclusion pattern' \ + \*{-x+,--exclude=}'[exclude files matching pattern]:exclusion pattern' \ '(-X --exclude-from)'{-X+,--exclude-from=}'[exclude files matching pattern in file]:exclude file:_files' \ '(-S --starting-file)'{-S+,--starting-file=}'[set first file in comparison]:start with file:_files' \ '(--to-file)--from-file=[compare specified file to all operands]:from file:_files' \