Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting directory should override ignored directories #524

Closed
jamischarles opened this issue Feb 19, 2015 · 8 comments
Closed

Starting directory should override ignored directories #524

jamischarles opened this issue Feb 19, 2015 · 8 comments
Labels
Milestone

Comments

@jamischarles
Copy link

tl;dr Starting directory should override previously set ignore options (including defaults)

This issue is born out of #523

Setup

mkdir temp
echo 'Bongo!' > temp/dir.txt

Tests
ack --ignore-dir=temp Bongo temp This should return a result but doesn't.
ack -f --ignore-dir=temp temp This should return dir.txt but doesn't.

hoelzro added a commit that referenced this issue Mar 24, 2015
If I use --ignore-dir, in my ackrc or on the command line, and I
specify a directory that would normally be ignored on the command
line, that directory and its descendants are ignored by ack.  This
commit adds a test for this situation.
hoelzro added a commit that referenced this issue Mar 24, 2015
@hoelzro
Copy link
Collaborator

hoelzro commented Mar 24, 2015

@jamischarles This is resolved in Git HEAD as of 4091db4.

@jamischarles
Copy link
Author

@hoelzro Awesome. When do you think this will make it into a release?

@hoelzro
Copy link
Collaborator

hoelzro commented Mar 24, 2015

@jamischarles That's up to @petdance; I think he's been gearing up for a 2.16 release.

@petdance
Copy link
Collaborator

@jamischarles Can you please test this out on the dev branch, or the newly-released 2.15_02?

@petdance petdance added the bug label Dec 18, 2015
@usmonster
Copy link

Haven't tested, but what is the desired behavior for this use case:

mkdir temp foobar
echo 'Bongo!' > temp/dir.txt
cp temp/dir.txt foobar/
ack --ignore-dir=temp Bongo *

? Thanks!

@petdance
Copy link
Collaborator

petdance commented May 3, 2016

Anything specified on the command line overrides whatever exclusions may happen because of switches. In this case, ack Bongo * expands to ack Bongo temp and that temp overrides --ignore-dir=temp.

@usmonster
Copy link

Makes sense to me--thanks for the clarification!

@petdance petdance changed the title Bug: Starting directory should override ignored directories Starting directory should override ignored directories Mar 16, 2017
@petdance petdance added this to the 2.16 milestone Mar 17, 2017
@petdance
Copy link
Collaborator

This went out in 2.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants