wincent/ferret

Can get it work

wclr opened this issue · 9 comments

wclr commented

I just want to search word "name" in all files

:Ack \bname\

image

Am I doing something wrong?

What's the trailing backslash for?

Normally you would search for a word with :Ack -w word or :Ack \bword\b.

wclr commented

image

This still gives this error, what can be the cause?

I see it's using grep for the search. I've never really tested it with that, but by trying it locally here I can see that it's broken.

You should install rg (RipGrep), ag (The Silver Searcher), or ack if you want things to work out of the box. If you do this you'll have a much better experience anyway, because they are much faster than grep and have a lot of very useful features. In the meantime, I'll investigate to see what config is necessary to make vanilla grep work out of the box.

I am toying with the idea of dropping support for grep (see the commit I just made to the next branch), although I might have another crack at making it work later. The main issue I am concerned with is finding a cross-platform-compatible way of invoking grep, as I bet the flags are different for BSD vs GNU grep etc. I might be able to work around the issue by making it possible for users to configure it however they like.

wclr commented

I have ack-grep installed on my ubuntu (bash shell for windows) https://github.com/mileszs/ack.vim works with it.

What is ack-grep? Is that just the name of the package that you install to get ack? If so, is it in your $PATH?

Can you do this in Vim?

:echo executable('ack')

Or is it just ack installed under the name ack-grep?

Ok, so I added support for ack-grep, and in testing it found out that I had broken ack support on the master branch a couple of weeks ago, and that made it into the 1.3 release, so I am going to push out a 1.3.1 release presently.

I think this should be resolved now, so closing. Please feel free to comment if I am mistaken.

wclr commented

Seem to work, thanks!