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

--type-add=module:match:/node_modules/ should work. #440

Closed
idearat opened this issue Mar 20, 2014 · 2 comments
Closed

--type-add=module:match:/node_modules/ should work. #440

idearat opened this issue Mar 20, 2014 · 2 comments
Labels

Comments

@idearat
Copy link

idearat commented Mar 20, 2014

You can't create "type" filters that work on the full path, they only appear to work on the filename itself. Unfortunately this means you can't categorize files into types based on where they reside in your project. So you can't make a file type "test" for all files under a test dir, or "module" for all files under your node_modules directory. This would let you then search with a --type=nomodule or --type=notest but that currently doesn't work. Yes, you can --ignore-dir, but I think using pattern matching is more powerful and flexible.

@hoelzro hoelzro added this to the Maybe milestone Sep 3, 2014
@hoelzro
Copy link
Collaborator

hoelzro commented Sep 11, 2014

@idearat This is an interesting idea, but how would this behave if you weren't at the project root? Let's say I'm in $ROOT/app/controllers and I do an ack --module something; how should that behave?

@idearat
Copy link
Author

idearat commented Sep 11, 2014

I don't expect ack to behave differently than it normally would in the sense I'd expect things to default to the current directory but offer the option of rooting the search elsewhere. It's simple enough to create aliases to push/pop a project root if that were consistently an issue within a project subtree.

@petdance petdance removed the maybe label Mar 18, 2017
@petdance petdance removed this from the Maybe milestone Mar 18, 2017
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

3 participants