zsh-users
 help / color / mirror / code / Atom feed
* gcc completion
@ 2001-11-23 13:45 Vincent Lefevre
  2001-11-23 14:02 ` Borsenkow Andrej
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 2001-11-23 13:45 UTC (permalink / raw)
  To: zsh-users

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?

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: gcc completion
  2001-11-23 13:45 gcc completion Vincent Lefevre
@ 2001-11-23 14:02 ` Borsenkow Andrej
  2001-11-23 14:12   ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Borsenkow Andrej @ 2001-11-23 14:02 UTC (permalink / raw)
  To: 'Vincent Lefevre', zsh-users

> 
> 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?
> 

bor@itsrm2% gcc -o ^Xh
tags in context :completion::complete:gcc::
    option-o-1  (_arguments _gcc)
tags in context :completion::complete:gcc:option-o-1:
    all-files  (_files _arguments _gcc)

So setting ignored-patterns for the latter context should do the trick,
i.e. something like

zstyle ':completion::complete:gcc:option-o-1:all-files' ignored-patterns
'*.c'

-andrej


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc completion
  2001-11-23 14:02 ` Borsenkow Andrej
@ 2001-11-23 14:12   ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2001-11-23 14:12 UTC (permalink / raw)
  To: Zsh users list

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@csr.com>                  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.
**********************************************************************


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-11-23 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-23 13:45 gcc completion Vincent Lefevre
2001-11-23 14:02 ` Borsenkow Andrej
2001-11-23 14:12   ` Peter Stephenson

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).