You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GNU grep has -Z and --null. git grep has -z and --null. However, neither support multiline PCRE matching.
I wanted to use this to detect files that don't end in a final newline, and pipe that into another command to remedy the situation.
Previously, my script only removed trailing whitespace and optionally replaced tabs with spaces, so git grep did the trick. The script is able to handle arbitrary filenames, and I'd like it to stay that way.
The text was updated successfully, but these errors were encountered:
GNU
grep
has-Z
and--null
.git grep
has-z
and--null
. However, neither support multiline PCRE matching.I wanted to use this to detect files that don't end in a final newline, and pipe that into another command to remedy the situation.
Previously, my script only removed trailing whitespace and optionally replaced tabs with spaces, so
git grep
did the trick. The script is able to handle arbitrary filenames, and I'd like it to stay that way.The text was updated successfully, but these errors were encountered: