Closed vbauerster closed 5 years ago
With -G
option it is ambiguous to respect -i
and -S
options (imho), because when -G
is specified there are two patterns: one for path limit and one for content.
By the way, ag
treats -g
and -G
options with -i
always on, i.e. if either -g
or -G
is specified -i
is implied. Maybe it is bug in ag
.
Just came here to ask about why -g
wasn't respecting -i
, wondering if it was a bug. I ended up using ag
for this specific purpose instead, because as stated it returns all matches. Not sure if it's a bug or not but I think it's more helpful to return too many matches than too few, as the former can be handled by the user with some extra work.
Well, I used to submit pr, which would fix this, but looks like it didn't get any attention. Personally I've switched to rg
.
@vbauerster I tried switching but they have no real equivalent of -g
. The closest they have is --files -g
or something, but that didn't even come close to what I wanted, like respecting gitignore.
@rosshadden rg --files
respects gitignore. If it isn't, please file a bug.
@BurntSushi I don't mean to turn this into a conversation about rg
, but the --files
argument is just not anywhere close to how -g
behaves in ack
, ag
, or pt
. I have brought this up in its github before but users of rg
don't seem to care.
For example pt -g foo
will find the following:
test/a/b.c
test/a.b
a/test/b.c
a/b/c/d/e/test/f.g
a/b/c/d/test.e
foo-test
foo_test
testing
Whereas rg --files test
finds just:
test/a/b.c
test/a.b
And rg --files -g test
finds nothing at all. I have been as of yet unable to find a series of arguments that comes even remotely close to what these other projects all handle consistently.
Please file a bug on the proper issue tracker. Not here.
On Oct 1, 2017 1:39 PM, "Ross Hadden" notifications@github.com wrote:
@BurntSushi https://github.com/burntsushi I don't mean to turn this into a conversation about rg, but the --files argument is just not anywhere close to how -g behaves in ack, ag, or pt. I have brought this up in its github before but users of rg don't seem to care.
For example pt -g foo will find the following:
test/a/b.c test/a.b a/test/b.c a/b/c/d/e/test/f.g a/b/c/d/test.e foo-test foo_test testing
Whereas rg --files test finds just:
test/a/b.c test/a.b
And rg --files -g test finds nothing at all. I have been as of yet unable to find a series of arguments that comes even remotely close to what these other projects all handle consistently.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/monochromegane/the_platinum_searcher/issues/175#issuecomment-333393161, or mute the thread https://github.com/notifications/unsubscribe-auth/AAb34i1IADCrmp7MuOLPHbH0g4Y4gQ-Oks5sn85UgaJpZM4Mk7t6 .
Option
-g
doesn't respect neither-i
nor-S
options, so there is no way match path pattern case insensitively.For example Given pwd
files
running
pt -ig context
producescontext/context.txt
.should: