Reference
lancet rg — Full ripgrep Parity Matrix
Complete flag-by-flag comparison verified byte-for-byte against ripgrep 15.2.
Verified byte-for-byte against ripgrep 15.2 across 68 edge-case fixtures in bench/rg_parity.py (Unicode case folding, CRLF, missing trailing newline, binary skips, -m with -C, --vimgrep, -L, --max-depth, --max-filesize) and Linux v6.12 full-tree queries.
Patterns & Matching#
| Flag | Meaning | Status | Notes |
|---|---|---|---|
-e, --regexp <PATTERN> | Search pattern (repeatable) | Supported | Combined with regex alternation |
-f, --file <FILE> | Read patterns per line (- stdin) | Supported | |
-F, --fixed-strings | Treat patterns as literals | Supported | |
-i / -s / -S | Ignore-case / sensitive / smart-case | Supported | Last wins; AST-aware -S (e.g. \W keeps insensitive) |
-w, --word-regexp | Surrounded by word boundaries | Supported | Matches rg boundary behavior (-w '@x' works) |
-x, --line-regexp | Match spans whole line | Supported | |
-v, --invert-match | Lines not matching pattern | Supported | |
-U, --multiline-dotall | Multiline match & . matches \n | Supported | |
-P, --pcre2 | Lookarounds & backreferences | Unsupported | Linear-time Rust regex + sound HIR trigram lowering |
Output & Formatting#
| Flag | Meaning | Status | Notes |
|---|---|---|---|
-o, -c, --count-matches | Only matches / line count / match count | Supported | |
-l, --files-without-match, -q | Matching paths / non-matching / quiet | Supported | |
-m <N>, -A, -B, -C | Max matching lines per file & context | Supported | Trailing context respects -m; emits -- separators |
--passthru (alias --passthrough) | Print matching & non-matching lines | Supported | Prints non-matching files too; last of --passthru/-A/-B/-C wins |
-n / -N | Show / hide line numbers | Supported | ON by default even when piped |
-H / -I, --column, --vimgrep | Filename visibility, 1-based column, vimgrep | Supported | Last of -H/-I wins |
--json, -0, -r <TEXT> | rg JSON Lines, NUL sep, $1/${name} replace | Supported | |
--color <WHEN> | auto, always, ansi, never | Supported | auto colors TTYs only (NO_COLOR/TERM=dumb respected) |
--sort, --no-heading | Sort / disable grouped headings | No-op | Always path-sorted; never emits headings |
File Traversal, Filtering & Lancet Extensions#
| Flag | Meaning | Status | Notes |
|---|---|---|---|
-g, --iglob, -t, -T, --type-list | Glob & type filters | Supported | Positive globs override hidden/ignore like rg |
--type-add <SPEC> | NAME:GLOB or NAME:include:A,B | Supported | Applies to -t, -T, --files, --type-list |
-a, -u/-uu/-uuu, -., --no-ignore | Binary/hidden/ignore overrides | Supported | |
-L, --max-depth, --max-filesize | Follow symlinks, depth limit, size (K/M/G) | Supported | --trust-index -L falls back to live walk |
--files, -j/--threads | Print searched paths, worker count | Supported | |
--docs | Search PDF/Office/HWP/archive text in-process | Extension | Off by default for strict rg parity |
--no-index, --trust-index, --index-dir | Control .lancet index mode | Extension | Default mode is fresh auto |
--pre <CMD> | External per-file preprocessor | Unsupported | Replaced by in-process --docs |