summaryrefslogtreecommitdiffstats
path: root/grep
AgeCommit message (Collapse)Author
2016-10-29Move all gitignore matching to separate crate.Andrew Gallant
This PR introduces a new sub-crate, `ignore`, which primarily provides a fast recursive directory iterator that respects ignore files like gitignore and other configurable filtering rules based on globs or even file types. This results in a substantial source of complexity moved out of ripgrep's core and into a reusable component that others can now (hopefully) benefit from. While much of the ignore code carried over from ripgrep's core, a substantial portion of it was rewritten with the following goals in mind: 1. Reuse matchers built from gitignore files across directory iteration. 2. Design the matcher data structure to be amenable for parallelizing directory iteration. (Indeed, writing the parallel iterator is the next step.) Fixes #9, #44, #45
2016-10-10Fix debug expression statement.Andrew Gallant
2016-09-25grep 0.1.3Andrew Gallant
2016-09-25Don't union inner literals of repetitions.Andrew Gallant
If we do, this results in extracting `foofoofoo` from `(\wfoo){3}`, which is wrong. This does prevent us from extracting `foofoofoo` from `foo{3}`, which is unfortunate, but we miss plenty of other stuff too. Literal extracting needs a good rethink (all the way down into the regex engine). Fixes #93
2016-09-24Add --smart-case.Andrew Gallant
It does what it says on the tin. Closes #70.
2016-09-21grep 0.1.2Andrew Gallant
2016-09-21Fix a performance bug where using -w could result in very bad performance.Andrew Gallant
The specific issue is that -w causes the regex to be wrapped in Unicode word boundaries. Regrettably, Unicode word boundaries are the one thing our regex engine can't handle well in the presence of non-ASCII text. We work around its slowness by stripping word boundaries in some circumstances, and using the resulting expression as a way to produce match candidates that are then verified by the full original regex. This doesn't fix all cases, but it should fix all cases where -w is used.
2016-09-21Bump regex version.Andrew Gallant
2016-09-17grep 0.1.1Andrew Gallant
2016-09-16Improve the "bad literal" error message.Andrew Gallant
Incidentally, this was done by using the Debug impl for `char` instead of the Display impl. Cute. Fixes #5.
2016-09-13add readmeAndrew Gallant
2016-09-13update grep Cargo.tomlAndrew Gallant
2016-09-11Update regex.Andrew Gallant
2016-09-10Fix off-by-one bug in searcher.Andrew Gallant
2016-09-08Rename xrep to ripgrep.Andrew Gallant
2016-09-06Fix grep match iterator.Andrew Gallant
2016-09-06Fix required literal handling and add debug prints.Andrew Gallant
In particular, if we had an inner literal and were doing a case insensitive search, then the literals are dropped because we previously only allowed a single inner literal to have an effect. Now we allow alternations of inner literals, but still don't quite take full advantage.
2016-09-05Fix deps so that others can build it.Andrew Gallant
2016-09-03making search work (finally)Andrew Gallant
2016-08-29The search code is a mess, but...Andrew Gallant
... we now support inverted matches and line numbers!
2016-08-28Implementing core functionality.Andrew Gallant
Initially experimenting with crossbeam to manage synchronization.
2016-08-24docs and small polishAndrew Gallant
2016-08-24Remove the buffered reader.Andrew Gallant
We really need functionality like this when memory maps aren't suitable, either because they're too slow or because they just aren't available (like for reading stdin). However, this particular approach was completely bunk. Namely, the interface was all wrong. The caller needs to maintain some kind of control over the search buffers for special output features (like contexts or inverted matching), but this interface as written doesn't support that kind of pattern at all. So... back to the drawing board.
2016-08-08Refactor buffered test.Andrew Gallant
2016-08-05updateAndrew Gallant
2016-06-22progressAndrew Gallant
2016-06-20refactor progressAndrew Gallant