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

Add a --files-from option #34

Closed
hoelzro opened this issue Apr 21, 2012 · 4 comments
Closed

Add a --files-from option #34

hoelzro opened this issue Apr 21, 2012 · 4 comments
Labels

Comments

@hoelzro
Copy link
Collaborator

hoelzro commented Apr 21, 2012

Normally, ack gets its list of files to search from ARGV. This feature would allows uses to specify a file containing one filename per line that specifies the list of files.

@hoelzro
Copy link
Collaborator Author

hoelzro commented Apr 23, 2012

I wonder if there's a way we could also allow normal ack filters to be applied to this list? I found myself wanting the following today:

for file in $(ack --files-from=<(git ls-files --modified) --perl -f); do
  perl -c $file
done

(checks that all Perl files that have been changed compile)

@hoelzro
Copy link
Collaborator Author

hoelzro commented Apr 23, 2012

This could also allow functionality like that requested in #35.

@hoelzro
Copy link
Collaborator Author

hoelzro commented Apr 26, 2012

Expanding on how this would work with #35: we could have a way to alias option groupings, so ack --mtime=$mtime would translate to something like ack --files-from=<(find . -mtime $mtime), and ack --git-dirty would translates to something like ack --files-from=<$(git ls-files --modified).

@hoelzro
Copy link
Collaborator Author

hoelzro commented May 28, 2012

This has been added.

@hoelzro hoelzro closed this as completed May 28, 2012
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

1 participant