feat(builtins): add grep -L, --exclude-dir, -s, -Z flags#385
Merged
Conversation
2eed0e5 to
8aebcd9
Compare
- -L/--files-without-match: print filenames with zero matches (#380) - --exclude-dir=GLOB: skip directories during recursive grep (#381) - -s/--no-messages: suppress error messages for nonexistent files (#382) - -Z/--null: use \0 after filenames instead of : or \n (#383) Closes #380, closes #381, closes #382, closes #383
8aebcd9 to
4b3eabe
Compare
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.
Summary
-L/--files-without-matchflag: print filenames that have zero matches (inverse of-l) - Closes feat(grep): add -L (--files-without-match) flag #380--exclude-dir=GLOBflag: skip entire directories during recursive grep - Closes feat(grep): add --exclude-dir flag for recursive search #381-s/--no-messagesflag: suppress error messages about nonexistent/unreadable files - Closes feat(grep): add -s (--no-messages) flag #382-Z/--nullflag: print\0after filenames instead of:or\n(for-l/-Loutput and filename prefixes) - Closes feat(grep): add -Z (--null) flag for null-byte filename separator #383Test plan
grep.test.shcargo fmt --checkpassescargo clippy --all-targets --all-features -- -D warningspassescargo test --all-features -p bashkit --libpasses (1126 tests)cargo test --all-features -p bashkit --test spec_tests -- greppasses (82 spec tests)