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 an '--ignore' flag or similar #12

Closed
ciarand opened this issue May 24, 2014 · 4 comments
Closed

Add an '--ignore' flag or similar #12

ciarand opened this issue May 24, 2014 · 4 comments

Comments

@ciarand
Copy link

ciarand commented May 24, 2014

Reflex doesn't seem to have an easy way of ignoring certain paths. Many package management solutions for various languages (npm for node, composer for php, etc.) pull the project's dependencies into a "vendor" directory (by purpose, not necessarily by name - e.g. node uses node_modules). Since these can often be large or recursive (node) it makes sense to be able to ignore these folders for performance and FS (#6) reasons.

Imagined usage would be like so:

reflex -g '*.c' --ignore vendor/ make
# or
reflex -g '*.c' -i vendor/ make

If you'd accept a PR I can put one together.

@cespare
Copy link
Owner

cespare commented May 24, 2014

Thanks for the suggestion. This, #6, and #9 have overlapping requirements (although I note that, if it's for performance reasons or FS limitations, only whole directory matching meets your needs).

I think this is reasonable, but I'd like to give a bit more thought about how to balance these related requests.

@ciarand
Copy link
Author

ciarand commented May 24, 2014

👍 Let me know if you'd like me to put something together

@cespare
Copy link
Owner

cespare commented Sep 13, 2014

OK, this has been solved by some recent changes -- see #5 and 4c6978c for details. Basically you can do an inverse regex match like this: reflex -R '^dir/' echo filename is {}. Reflex notices that nothing inside dir/ can possibly match this regex and skips over it, avoiding the FS issues from #6.

So in your example, you can do -R ^vendor/ (or just -R vendor/, which also works but is slightly less precise as it will also ignore things like foo/vendor or foovendor).

@ciarand
Copy link
Author

ciarand commented Sep 13, 2014

Awesome, thanks @cespare.

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

No branches or pull requests

2 participants