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

Re: gcc completion



Borsenkow Andrej wrote:
> > 
> > With the gcc completion distributed with zsh, could the .c files be
> > ignored after the -o option, perhaps by proposing file instead of
> > file.c?
> 
> zstyle ':completion::complete:gcc:option-o-1:all-files' ignored-patterns
> '*.c'

Yes, or use file-patterns for more control.

But perhaps it's generally useful enough for something like this?  You can
still override it with your own styles --- though you might need to upgrade
the `all-files' to a `*' to catch the globbed-files tag (or use
the tag-order style).

Index: Completion/Unix/Command/_gcc
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_gcc,v
retrieving revision 1.1
diff -u -r1.1 _gcc
--- Completion/Unix/Command/_gcc	2001/04/02 11:50:56	1.1
+++ Completion/Unix/Command/_gcc	2001/11/23 14:00:19
@@ -166,7 +166,7 @@
 _arguments -C -M 'L:|-{fW}no-=-{fW} r:|[_-]=* r:|=*' \
   "$args[@]" \
   -c -S -E -v -a -w -C -H -P -s '(-pg)-p' '(-p)-pg' \
-  '-o:output file:_files' \
+  '-o:output file:_files -g \^\*.\(c\|h\|cc\|C\|cxx\)' \
   '-x:input file language:(c objective-c c++ c-header cpp-output c++-cpp-output assembler assembler-with-cpp none)' \
   '+e-:virtual function definitions in classes:((0\:only\ interface 1\:generate\ code))' \
   '-d-:dump:->dump' \

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



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