help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Doing a file filter with grep


From: RealityMonster
Subject: Re: Doing a file filter with grep
Date: 26 Jan 2007 08:40:44 -0800
User-agent: G2/1.0

Perfect. I read the man page, but I didn't realize '--include' was an
exclusive pattern (despite it saying that RIGHT THERE). This'll be easy
to write a wrapper around so I can search by directory and pattern
without having to type --include=*.foo all the time.

Thanks,

JS

On Jan 26, 2:29 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From: "RealityMonster" <jan.sacha...@gmail.com>
> > Date: 25 Jan 2007 14:37:45 -0800
>
> > So I've been getting find and grep working on my WinXP system with
> > emacs. I can finally properly search for files and search in files for
> > the things that I want. I'd like, however, to put a file filter on it,
> > so I can search just through .h files or .cpp files.
>
> > On the command line, I'd do something like this:
>
> > grep -r Pattern `find . -name *.cpp`After typing "M-x grep RET" inside 
> > Emacs, make the Grep command be
> this:
>
>     grep -r Pattern . --include="*.cpp"
> 
> That's it! no need to use `find'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]