c files?

3 views
Skip to first unread message

rogerdpack

unread,
Nov 16, 2009, 2:54:50 PM11/16/09
to ack dev/users
Perhaps some kind poster here can help me out.
How do you "ack" for only c files?

--c doesn't work
and

C:\dev\ruby\downloads\ruby_trunk_debug_flags>ack 'Note that' --type=c
\installs\ack.pl: Unknown --type "c"
\installs\ack.pl: See ack --help or ack --man for options.

Also shouldn't ack --help output "all known types" -- that might be
useful.

Thanks.

A. S. Budden

unread,
Nov 16, 2009, 2:58:52 PM11/16/09
to ack-...@googlegroups.com
2009/11/16 rogerdpack <rogerp...@gmail.com>:
> Perhaps some kind poster here can help me out.
> How do you "ack" for only c files?

Try:

ack --cc

> --c doesn't work

I imagine this is to do with getopt and it's way of differentiating
between short options (one character, preceded by one dash) and long
options (multiple characters preceded by two dashes), but I could be
wrong...

> and
>
> C:\dev\ruby\downloads\ruby_trunk_debug_flags>ack 'Note that' --type=c
> \installs\ack.pl: Unknown --type "c"
> \installs\ack.pl: See ack --help or ack --man for options.
>
> Also shouldn't ack --help output "all known types" -- that might be
> useful.

If you do "ack --help", it says "See "ack --help type" for supported
filetypes.". If you do "ack --help type", you get:

Usage: ack [OPTION]... PATTERN [FILES]

The following is the list of filetypes supported by ack. You can
specify a file type with the --type=TYPE format, or the --TYPE
format. For example, both --type=perl and --perl work.

Note that some extensions may appear in multiple types. For example,
.pod files are both Perl and Parrot.

--[no]actionscript .as .mxml
--[no]asm .asm .s
--[no]batch .bat .cmd
--[no]binary Binary files, as defined by Perl's -B op (default: off)
--[no]cc .c .h .xs
--[no]cfmx .cfc .cfm .cfml
--[no]cpp .cpp .cc .cxx .m .hpp .hh .h .hxx
--[no]csharp .cs
--[no]css .css
--[no]elisp .el
--[no]erlang .erl .hrl
--[no]fortran .f .f77 .f90 .f95 .f03 .for .ftn .fpp
--[no]haskell .hs .lhs
--[no]hh .h
--[no]html .htm .html .shtml .xhtml
--[no]java .java .properties
--[no]js .js
--[no]jsp .jsp .jspx .jhtm .jhtml
--[no]lisp .lisp .lsp
--[no]lua .lua
--[no]make Makefiles
--[no]mason .mas .mhtml .mpl .mtxt
--[no]objc .m .h
--[no]objcpp .mm .h
--[no]ocaml .ml .mli
--[no]parrot .pir .pasm .pmc .ops .pod .pg .tg
--[no]perl .pl .pm .pod .t
--[no]php .php .phpt .php3 .php4 .php5
--[no]plone .pt .cpt .metadata .cpy .py
--[no]python .py
--[no]rake Rakefiles
--[no]ruby .rb .rhtml .rjs .rxml .erb .rake
--[no]scheme .scm
--[no]shell .sh .bash .csh .tcsh .ksh .zsh
--[no]skipped Files, but not directories, normally skipped by
ack (default: off)
--[no]smalltalk .st
--[no]sql .sql .ctl
--[no]tcl .tcl .itcl .itk
--[no]tex .tex .cls .sty
--[no]text Text files, as defined by Perl's -T op (default: off)
--[no]tt .tt .tt2 .ttml
--[no]vb .bas .cls .frm .ctl .vb .resx
--[no]vim .vim
--[no]xml .xml .dtd .xslt .ent
--[no]yaml .yaml .yml


--
http://sites.google.com/site/abudden

Andy Lester

unread,
Nov 16, 2009, 3:35:57 PM11/16/09
to ack-...@googlegroups.com

On Nov 16, 2009, at 1:58 PM, A. S. Budden wrote:

> If you do "ack --help", it says "See "ack --help type" for supported
> filetypes.". If you do "ack --help type", you get:


I'm changing that message to say

See ack --help, ack --help-types or ack --man for options.

xoxo,
Andy

--
Andy Lester => an...@petdance.com => www.theworkinggeek.com => AIM:petdance




Reply all
Reply to author
Forward
0 new messages