You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Honor argument order for --type-add and --type-clear to match ripgrep #201
tgrep always applies every --type-clear before every --type-add, regardless of their order on the command line. ripgrep applies these operations in argument order.
For --type-add 'rust:*.txt' --type-clear rust -t rust, ripgrep removes the type and reports it as undefined, while tgrep adds it back and searches .txt files.
The current tgrep help explicitly describes clearing before adding. This is therefore a request for ripgrep compatibility, rather than a claim that tgrep violates that help text.
The content-search cases reproduce with --no-index, an on-disk index, and tgrep serve --no-watch.
To repeat the indexed cases, run tgrep index data, remove --no-index, and keep the directory path data. For the server cases, start tgrep serve --no-watch data in another terminal and repeat those directory searches. --stats was used in the Windows harness to verify the selected backend, including (via server).
Environment
tgrep 1.2.0, official Windows x86_64 release.
Source inspected at release commit 3ba6ee02537281b68ee1366bb40df9f8b7cc54f0.
Windows; test harness run with PowerShell 7.
ripgrep 15.1.0 (af60c2de9d).
Verified on 2026-10-12. The shell examples describe the same fixture bytes and arguments tested on Windows.
Cause
tgrep-cli/src/search.rs:2233 receives separate add/clear lists, clears all requested types first, then applies all additions. The original interleaving is discarded.
Possible fix
Retain and replay the ordered type-definition operations for search and --type-list. Update the help text if this compatibility change is adopted.
A regression could cover both add-then-clear and clear-then-add sequences, with content search and type listing.
Activity
Fix ripgrep compatibility issues #194–#201 (#202)