Re: multiple source file extensions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you're using a recent version of bash, you could enable the
'globstar' option:

    $ shopt -s globstar
    $ git grep 'pattern' **/*.{cc,cpp,h}

Does that work?

On Fri, May 1, 2015 at 8:40 PM, Thiago Farina <tfransosi@xxxxxxxxx> wrote:
> Hey!
>
> How do I tell 'git grep' to search only in .cc, .cpp and .h files?
>
> From http://gitster.livejournal.com/27674.html it seems possible to do
> some filter, but in this article grep is told to search only in C
> source files.
>
> Bye!
>
> --
> Thiago Farina
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Josh Hagins
College of Engineering
Cornell University '14
(843) 847-6008
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]