Closed zijianyue closed 6 years ago
I'm pretty sure this has to do with the way quoting works on Windows machines.
See the following:
C:\> echo a
a
C:\> echo 'a'
a
C:\> echo \'a\'
a
C:\> REM yes, Windows is insane and uses ^ to escape.
C:\> echo ^'a^'
'a'
this is the line that the problem originates from. You might fix it just by branching on the value of system-type
.
Thanks, but I'm still not very clear how to fix this .You mean error exist in this command : " | grep -v '^$' | sed s/\'/\\\'/ | xargs -I '{}' ls " How to write it on windows, please give a demonstrate.
This is a bug in the package itself. The author should decide what to do with it. I don't have Emacs on Windows, so I can't make a PR, unfortunately.
I'm afraid I don't have a Windows environment to test this on, right now. Pull requests are certainly welcome in the mean time.
I ag-dired tm_in.h in a directory ,but I got the error as below(I use msys environment, emacs 24.5):
ag --nocolor -g 'tm_in.h' "a directory" | grep -v '^$' | sed s/\'/\\'/ | xargs -I '{}' ls -alh '{}' & sed: -e expression #1, char 8: unterminated `s' command
ag finished at Tue Apr 28 14:35:44