wincent/ferret

ag: unrecognized option '--vimgrep'

wclr opened this issue · 2 comments

wclr commented

Error running search using ag. ag: unrecognized option '--vimgrep' on Ubuntu 14.04 (Ubuntu bash for windows 10), installed using apt-get install silversearcher-ag

It might be that older versions of ag don't support this switch. Do you want to try editing this line to remove the --vimgrep and see if that works?

I am not sure how we could elegantly autodetect support for this. Perhaps we could run ag --help at start-up and check that the switch is available. Or we could add a configuration option to make the search commands configurable; ag --vimgrep would be the default, but you could override it if you wanted to. This is something I wanted to do anyway as a part of #38.

This is a dupe of #32, though, so I am going to close this one. As I said on that one, feel free to submit a PR if this is an itch that you want to scratch. Otherwise, I will get to it, but I am not sure exactly when.