feat(search): allow repeated exit-code filters - #4132
Merged
markovejnovic merged 1 commit intoSep 14, 2026
Merged
Conversation
pederbe
marked this pull request as ready for review
September 13, 2026 12:05
Contributor
Greptile SummaryAdds repeatable exit-code inclusion and exclusion filters to CLI history search.
Confidence Score: 5/5The PR appears safe to merge. The repeated options are parsed correctly, generate safe integer-only predicates, and preserve filtering order across search and deletion paths. Important Files Changed
Reviews (1): Last reviewed commit: "feat(search): allow repeated exit-code f..." | Re-trigger Greptile |
Member
|
LGTM! Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The CLI's
--exit/--exclude-exitflags only accepted a single value each, unlike author/shell, which already supported repeats.Sqlite::searchcould apply one equality and one inequality but nothing more.Change
exit/exclude_exitfromOption<i64>toVec<i64>in the CLI, matching the author/shell pattern.--exit 1 --exit 2now matches either code; repeated--exclude-exitremoves every listed code.OptFiltersto take borrowed&[i64]slices for these fields, with an empty slice meaning no restriction. Borrowing keepsOptFiltersCopyand works with the deletion loop that reuses the same filters.INpredicate for non-empty exit lists and oneNOT INfor exclusions. Both combine withANDalongside the existing filters. Exclusions win over overlapping inclusions; duplicates are harmless.Closes #2701
Checks