Closed hardenedapple closed 8 years ago
Hi! I wanted to write in a quick comment to say I really appreciate this contribution. I'll be slow to review it though because my wife just had a baby and everything else has been put to the backburner =)
Congratulations!!
and yeah, I think you've got your priorities in the right order :)
I'd like to suggest a few changes that I think fix some bugs, but rather than open up a new issue for each one I'm creating a pull request combining them.
grep --include= ... --exclude= ... "<pattern>" /directory/of/file
GNU grep ignores the directory passed on the command line because the --recursive flag is not set. To fix this I made the command line of the formgrep --include= ... --exclude= ... "<pattern>" /directory/of/file/*
which appears to work.ag
case-sensitive flag On my machine,ag
uses--smart-case
by default so your casesensitivity_ag test was failing. I added in the relevant flag to the correspondingRegisterGrepProgram
call and the test seems to work now.sed
in test.sh to change the separators before running the test and put them back after. Because this relies on the GNU specific '-i' flag, I only call that when running Linux, and not e.g. Solaris. This workaround isn't nice, but it should work for now.ag --nogroup --nocolor --column -s --file-search-regex="(\.m4|\.ac|\.in|\.am|\.mk|\.mak|\.dsp)" --ignore=".svn" --ignore=".git" --ignore=".hg" 'a' ~/.vim/bundle/easygrep/tests
works, whileag --nogroup --nocolor --column -s --file-search-regex="\.m4" --file-search-regex="\.ac" --file-search-regex="\.in" --file-search-regex="\.am" --file-search-regex="\.mk" --file-search-regex="\.mak" --file-search-regex="\.dsp" --ignore=".svn" --ignore=".git" --ignore=".hg" 'a' ~/.vim/bundle/easygrep/tests
doesn't.This I believe requires something like the patch
Unfortunately I get errors like /bin/bash: -c: line 0: unexpected EOF while looking for matching `"' with this, which is why it's not in my suggested changesets.
The second I didn't manage to fix at all -- the inclusion file regex includes '*[mM]akefile', which "ag" complains about.
Also I didn't manage to find the 'pt' program, so in order to maintain symmetry I added a test for it but left the expected output as "Unknown"
I should note I'm breaking a rule I have to always sleep on a changeset before pushing, but I expect any problems are more likely to be shaken out by testing on other machines rather than me thinking it through. Hence this is less of a "please put these changesets into your repo" and more of a "please consider these changes" request, with the assumption that there are problems in here that you may see easier than I.
Cheers