fix: fix grep "binary" errors when searching UTF-8 files with unicode characters like some of the Coyote source
This commit is contained in:
@@ -25,7 +25,11 @@ main() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local grep_args=(-nH --color=never)
|
||||
# --binary-files=text: GNU grep's binary heuristic false-positives on valid
|
||||
# UTF-8 source files >=128KiB when a multibyte character straddles an
|
||||
# internal read-buffer boundary, silently returning zero matches. This tool
|
||||
# only searches text, so always force text mode.
|
||||
local grep_args=(-nH --color=never --binary-files=text)
|
||||
|
||||
if [[ -d "$search_path" ]]; then
|
||||
# Use -r (not -R) so symlinks to directories are NOT followed - this avoids
|
||||
|
||||
Reference in New Issue
Block a user