-
fix(grep): use portable --null in system grep fallback (BSD/macOS)
发布于
2026-06-16 21:41:13 +00:00 The system-grep fallback (used when ripgrep is not installed) passed
-rnHZ, relying on -Z for the NUL filename separator the match parser
requires. -Z only means --null on GNU grep; on BSD/macOS grep it is an
alias for --decompress (zgrep mode), so output is plain
file:line:content with no NUL. parse_match_line() then matches zero
filenames and every result collapses into "N matches in 0 files" with
all lines hidden behind [+N more].Use the long option --null instead, which both GNU and BSD grep define
as "print a zero-byte after the file name".Related to #2310
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
下载附件