Can anyone here please explain to me how to make M-x grep work?
M-x grep<enter>
Gives me
Run grep (like this): grep -n <cursor>
I've been trying "sub*{$" (which is the regxp I'd like it to find for me) in the minibuffer where it drops the cursor, so the complete string is:
Run grep (like this): grep -n 'sub*{$'
But that gives me
Code:
cd c:/pathname-to-current-buffer/
grep -n 'sub*{$' NUL
'grep' is not recognized as an internal or external command,
operable program or batch file.
grep finished with no matches found at Tue Apr 26 18:15:19
in the *grep* buffer, which needless to say, is less than helpful.
What's the "NUL" doing in there? How do I search the current buffer and not some external file which doesn't concern me at all?
Apparently the logical command, `M-x grep -n 'sub*{$'` isn't an option, as a space after "grep" makes emacs think that I'm trying for an autocomplete of grep-find.
This is remarkably infuriating, and I'll be eternally thankful to anyone who can just explain to me how this works.
Thanks!