-
Notifications
You must be signed in to change notification settings - Fork 140
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
Provide an option in ack to only parse files passed to it. #614
Comments
You would probably do it as a file_filter to the File::Next iterator. But let's talk about behavior rather than implementation. |
What I understand is that you want to be able to do:
which would only search for More simply, you would have this:
which would then only list the files from filelist.txt that satisfy --perl. Let's try to think of things that could go wrong with that. |
Basically, |
I didn't ask the question. Maybe I should. Other than legacy is there a good reason -x doesn't support --type? |
|
In my environment, git grep is much faster at file finding than ack. Not to mention I only want to parse the files in the repo.
we have come up with a git alias that does what we want.
The problem is that -x and --type are mutually exclusive (see https://github.com/petdance/ack2/issues/607)
My proposal is a -X option that does just tells ack which files it needs to parse explicitly, including deciding if the file type, etc is appropriate.
NOTE: looking at File::Next, it already provides from_file so if you do File::Next:: from_file('-'), This should be all we need to implement -X?
The text was updated successfully, but these errors were encountered: