I'm using Emacs on windows, and was trying to run grep from within eshell (M-x eshell). The default shell through M-x is cmd.exe, but eshell has linux utilities so I'm trying to use eshell.
Now, when i try grep with typical arguments, say -i to a case insensitive search, I get a message saying 'pattern "-i" not found'. So, the grep tool seems to think the option is the pattern. But if I give the exact patter without any options, and the exact filename to search in, it works. For example, this works:
> grep "Hello" main.c
It opens up a new buffer with the results which I can click on, or browse through
This is quite inconvenient. Any help to fix this would be appreciated.
Side note, I've tried using the WSL ubuntu bash and that works fine, except the PROMPT looks all messed up, and the results of grep are not clickable.