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
git grep #679
Comments
I will add a task, similar to the implementation you've suggested but making use of the utilities in the package for parsing responses line by line, and allowing supported options to be passed through to |
BTW: just in case, I gave you wrong chain, it wont handle strings like:
more correct one will be: stdou
.toString()
.split("\n")
.map(line => line.trim())
.filter(line => !!line)
.map(line => [line.split(/:\s+/, 1).shift(), line.substring(line.split(/:\s+/, 1).shift().length).replace(/^:\s+/, '')])
.map(([path, line]) => ({path, line})) yep, it isn't optiomal, just want to highlight mistake |
Hi, you can now make use of Examples: https://github.com/steveukx/git-js/blob/main/examples/git-grep.md Please do let me know if you have any difficulties using it. |
Will be so nice to have git grep command, e.g.:
it might be as easy as calling exec sync and parsing stdout with something like:
something like:
src/lib/tasks/grep.ts
The text was updated successfully, but these errors were encountered: