[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rgrep on Windows with ezwinports. Shell quoting problem.
From: |
Óscar Fuentes |
Subject: |
rgrep on Windows with ezwinports. Shell quoting problem. |
Date: |
Tue, 24 Dec 2013 16:17:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
After trying with findutils/grep from GnuWin32 and MSYS without success,
using the binaries from
http://sourceforge.net/projects/ezwinports/files/ works with this config:
(setq find-program "d:/ez/bin/find")
(setq xargs-program "d:/ez/bin/xargs")
(setq grep-program "d:/ez/bin/grep")
but there are some issues. The lesser one is that the pattern "*" for
files does not cover those with extension (i.e. something like foo.cpp
is not matched) so one must use "*.*".
The most serious problem is that the rgrep output comes with lots of
warnings of this type:
d:/ez/bin/find: warning: Filenames usually don't contain slashes (though
pathnames do). That means that '-name *.bin\
' will probably evaluate to false all the time on this system. You might find
the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if
you are using GNU grep, you could use 'find ... -print0 | grep -FzZ *.bin\
'.
The above is a literal cut&paste from the output, which includes a
newline after ``*.bin\''. As shown on the *grep* buffer, the command
executed by rgrep is like this:
d:/ez/bin/find . [...] -o -name "*.bin" [...]
So at some point "*.bin" is translated to *.bin\[newline]
Directly pasting the command from the *grep* buffer into a Windows Shell
box works fine (after replacing d:/ez/bin/ with d:\ez\bin\). So the
problem is with Emacs modifying the command generated by rgrep before
passing it to the shell for execution.
How can I prevent that change?
- rgrep on Windows with ezwinports. Shell quoting problem.,
Óscar Fuentes <=