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

Use git grep over grep #18

Closed
tpwo opened this issue Jan 27, 2022 · 2 comments
Closed

Use git grep over grep #18

tpwo opened this issue Jan 27, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@tpwo
Copy link
Owner

tpwo commented Jan 27, 2022

One less dependency is always a nice thing, and it seems that the git grep command features everything that I need right now.

@tpwo tpwo added the enhancement New feature or request label Jan 27, 2022
@tpwo
Copy link
Owner Author

tpwo commented Jan 30, 2022

Also, -I flag should be added, so binary files (i.e. images attached to zettels) are not listed.

@tpwo tpwo closed this as completed in 3237338 Feb 16, 2022
@tpwo
Copy link
Owner Author

tpwo commented Feb 18, 2022

I've found another good side of this change. With this simple syntax in .gitattributes, it is possible to mark any file tracked by Git as binary:

*.svg binary

I just used it to hide .svg results while grepping in my ZK repo.

It also hides such files in Git diffs some might come handy in some situations. More details here.

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

No branches or pull requests

1 participant