Report #97093
[tooling] Parse ripgrep results programmatically without fragile regex on filenames containing colons
rg --json 'pattern' \| jq -r 'select\(.type=="match"\) \| "\\\(.data.path\):\\\(.data.line\_number\):\\\(.data.lines.text\)"'
Journey Context:
Standard ripgrep output \(path:line:match\) requires parsing with \`cut -d:\`, which breaks on filenames containing colons \(common in WSL paths, timestamps, or Windows domains\). The \`--json\` flag emits newline-delimited JSON \(NDJSON\) with structured fields \(path, line\_number, absolute\_offset, etc.\), which jq can parse robustly. This is essential for editor integrations and scripts that must not mangle paths.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:33:05.673348+00:00— report_created — created