From cb0802c2d01e632d90fde44b88b44811368d9e64 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Tue, 25 Aug 2026 13:06:16 -0600 Subject: [PATCH] fix: fix grep "binary" errors when searching UTF-8 files with unicode characters like some of the Coyote source --- assets/functions/tools/fs_grep.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/functions/tools/fs_grep.sh b/assets/functions/tools/fs_grep.sh index 2110a67..e7d92e9 100644 --- a/assets/functions/tools/fs_grep.sh +++ b/assets/functions/tools/fs_grep.sh @@ -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