Closed Opioid closed 6 years ago
Could you post the value of counsel-ag-command
after calling counsel-projectile-rg
and after calling counsel-rg
? Also, if you can try on a non-windows machine, does it make a difference?
I just tried on a linux machine and everything worked. Tomorrow I will take a look at counsel-ag-command on the windows machine.
counsel-rg:
"rg -i -M 120 --no-heading --line-number --color never %s ."
counsel-projectile-rg:
"rg -i -M 120 --no-heading --line-number --color never --glob !\"TAGS\" --glob !\".idea/\" --glob !\".ensime_cache/\" --glob !\".eunit/\" --glob !\".git/\" --glob !\".hg/\" --glob !\".fslckout/\" --glob !\"FOSSIL/\" --glob !\".bzr/\" --glob !\"_darcs/\" --glob !\".tox/\" --glob !\".svn/\" --glob !\".stack-work/\" %s "
I don't understand the issue. The ccounsel-ag-command
from counsel-projectile-rg
seems fine to me and it works on linux. Not sure what windows doesn't like about it but I guess it me be related either to the additional --glob
options or to the missing .
path. So please can you try the following on your windows machine and let me know what does and does not work?
(let ((counsel-rg-base-command "rg -i -M 120 --no-heading --line-number --color never %s "))
(counsel-rg))
(let ((counsel-rg-base-command "rg -i -M 120 --no-heading --line-number --color never --glob !\"TAGS\" --glob !\".idea/\" --glob !\".ensime_cache/\" --glob !\".eunit/\" --glob !\".git/\" --glob !\".hg/\" --glob !\".fslckout/\" --glob !\"FOSSIL/\" --glob !\".bzr/\" --glob !\"_darcs/\" --glob !\".tox/\" --glob !\".svn/\" --glob !\".stack-work/\" %s ."))
(counsel-rg))
I just tried it on this windows machine. The first, short command does not work. The second, long command does work.
Thanks, it looks like rg on Windows needs the .
(this is confirmed by abo-abo/swiper/issues/795).
Please update and test, it should hopefully work now.
It works now.
I noticed that counsel-projectile-rg is no longer working for me (at least on the windows machine I'm on right now). I can see an rg process in the taskmanager, but there is no progress. If I run counsel-rg from the same buffer I get results. (This was for a small project with 20 or so files organized in a couple of subfolders). The problem seems vaguely familiar to me, but I could be mistaken, and I don't remember what I did about it in the past.