zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: Bug#239975: diff tab completion broken for second dir
       [not found] <20040325041020.GA826@kitenet.net>
@ 2004-03-25 16:59 ` Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2004-03-25 16:59 UTC (permalink / raw)
  To: Joey Hess, 239975; +Cc: zsh-workers

> joey:~>mkdir a b
> joey:~>diff --exclude=foo --exclude=bar -ur a <tab><tab>
> --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' \


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-25 17:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040325041020.GA826@kitenet.net>
2004-03-25 16:59 ` PATCH: Re: Bug#239975: diff tab completion broken for second dir Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).