1

I try to use counsel-ag to grep through all files in a directory for a string. Basically, I thought this is what it was made for. I have ag 2.2.0 installed via macports on OS X 10.10.5 and it works fine in shell mode.

If I am in the same directory an invoke M-x counsel-ag I get the ag prompt but if I type a string I get no matches but the message No matches found. I don't see any message or error. Is there any way to check what ag is doing and why ivy is not displaying the candidates like it does in other cases?

1

I think it has something to do with ivy-prescient. Although, there is ivy-prescient-excluded-commands which contains counsel-ag to prevent the regex generation from being disturbed I have to add

(setq ivy-re-builders-alist
        '((swiper . ivy--regex-plus)
          (counsel-ag . ivy--regex-plus)
          (counsel-rg . ivy--regex-plus)
          (t      . ivy-prescient-re-builder)))

to get counsel-ag working again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.