Dirk Loss
a2ed677e03
Add support for the Nim programming language file type
2016-09-24 21:48:33 +02:00
Andrew Gallant
2fb9c3c42c
Merge pull request #56 from chrisdoc/feature/swift-file-type
...
Add support for the Swift programming language file type
2016-09-24 14:34:06 -04:00
Konto Mondo
3b45059212
FSharp language file type
2016-09-24 10:30:30 -04:00
chrisdoc
f74078af5b
Add support for the Swift programming language file type
2016-09-24 08:42:44 +02:00
Andrew Gallant
5ff9b2f2a2
Merge pull request #41 from BurntSushi/generic-ignore
...
Switch from .rgignore to .ignore.
2016-09-23 23:14:38 -04:00
Andrew Gallant
cc90511ab2
Switch from .rgignore to .ignore.
...
But don't actually remove support for .rgignore until the next semver
bump.
Note that this puts us in line with the silver searcher:
https://github.com/ggreer/the_silver_searcher/pull/974
Fixes #40
2016-09-23 22:44:33 -04:00
Andrew Gallant
f5d60a80a8
Merge pull request #28 from ledge23/patch-1
...
Add VB files to default type list
2016-09-23 22:33:12 -04:00
Andrew Gallant
6fa158f6d3
Merge pull request #29 from jimhester/r_extensions
...
Add a few more R relevant extensions
2016-09-23 22:32:10 -04:00
Andrew Gallant
6367dd61ba
Column numbers should start at 1.
...
ripgrep was documented to do 1-based indexing, so this is a bug and not
a breaking change.
Fixes #18
2016-09-23 17:11:09 -04:00
Jim Hester
98892de1c1
Add a few more R relevant extensions
2016-09-23 14:48:15 -04:00
Zack Schuster
273c14a45a
Add VB files to default type list
...
Use-case: While not a vogue technology, VB is still a common file type taught in many university settings and used in many commercial settings. Working with VB files out-of-the-box would provide a lot of value to `ripgrep` users.
Example: I'm working on converting a legacy app to a modern infrastructure. The legacy app mixes CS and VB files liberally, so I always need to check both. For portability, it would be nice to just be able to ask for `-tcs -tvb` without registering with `--type-add` first.
Tests: I didn't notice any coverage aimed at this part of the code, but if I'm mistaken I'll amend the PR.
2016-09-23 11:44:53 -07:00
Andrew Gallant
dfebed6cbe
Add --vimgrep flag.
...
The --vimgrep flag forces a line to be printed for every match, with
line and column numbers.
2016-09-22 21:32:38 -04:00
Andrew Gallant
5a9883d27c
Try to use memory maps more aggressively on Windows.
...
Some brief playing around suggests that it is faster.
However, it's probably slower in a VM. Let's prioritize native users.
2016-09-21 20:47:40 -04:00
Andrew Gallant
69095cf5c3
Add an error message for catching a common failure mode.
...
If you're in a directory that has a parent .gitignore (like, your $HOME),
then it can cause ripgrep to simply not do anything depending on your
ignore rules.
There are probably other scenarios where ripgrep applies some filter that
an end user doesn't expect, so try to catch the worst case (when ripgrep
doesn't search anything).
2016-09-20 20:25:24 -04:00
Andrew Gallant
7402db7b43
Add "unrestricted" flag.
...
I don't like having multiple flags do the same thing, but -u, -uu and -uuu
are much easier to remember, particularly with -uuu meaning "search
everything."
2016-09-20 20:24:03 -04:00
Andrew Gallant
f7ee914dd3
Add support for searching multiple patterns with -e.
...
Also, change -Q/--literal to -F/--fixed-strings because compatibility
with grep is probably better.
2016-09-17 16:55:58 -04:00
Andrew Gallant
bfbbfbf979
fix windows build
...
Why isn't CI running on each push? It seems to only be running on tagged
commits.
2016-09-17 12:54:46 -04:00
Andrew Gallant
0d14c74e63
Some minor performance tweaks.
...
This includes moving basename-only globs into separate regexes. The hope
is that if the regex processes less input, it will be faster.
2016-09-16 16:13:28 -04:00
Andrew Gallant
1c5884b2f9
try again...
2016-09-16 07:12:06 -04:00
Andrew Gallant
8203a80ac7
fix tests
2016-09-16 06:58:10 -04:00
Andrew Gallant
0e46171e3b
Rework glob sets.
...
We try to reduce the pressure on regexes and offload some of it to
Aho-Corasick or exact lookups.
2016-09-15 22:06:04 -04:00
Andrew Gallant
f5c85827ce
Don't traverse directory stack if we don't need to.
2016-09-15 12:40:28 -04:00
Andrew Gallant
7cefc55238
Remove .agignore from ignore file list.
2016-09-15 12:40:08 -04:00
Andrew Gallant
92c918ebd9
--no-ignore implies --no-ignore-parent
2016-09-14 14:33:37 -04:00
Andrew Gallant
c24f8fd50f
Replace crossbeam with deque.
...
deque appears faster.
2016-09-14 07:40:46 -04:00
Andrew Gallant
983c7fd6f9
We don't use thread_local any more, so remove it.
2016-09-13 21:21:36 -04:00
Andrew Gallant
fdca74148d
Stream results when feasible.
...
For example, when only a single file (or stdin) is being searched, then we
should be able to print directly to the terminal instead of intermediate
buffers. (The buffers are only necessary for parallelism.)
Closes #4 .
2016-09-13 21:11:46 -04:00
Andrew Gallant
68fa50709e
Don't skip the first arg.
...
Docopt will do it for us.
2016-09-11 13:33:25 -04:00
Andrew Gallant
ab91e4b874
Don't panic when an argument is invalid UTF-8.
...
Suggest a workaround.
2016-09-11 13:27:08 -04:00
Andrew Gallant
2b943eda47
Make file type filtering a lot faster.
...
We do this by avoiding using a RegexSet (*sigh*). In particular, file
type matching has much simpler semantics than gitignore files, so we don't
actually need to care which file type matched. Therefore, we can get away
with a single regex with a giant alternation.
2016-09-11 13:26:53 -04:00
Andrew Gallant
37544c092f
We don't need regex-syntax directly in ripgrep.
2016-09-11 13:25:37 -04:00
Andrew Gallant
cb0f8fd2fa
Bump default thread count to 8.
2016-09-11 00:42:39 -04:00
Andrew Gallant
19615245cd
Make line counting much faster.
2016-09-10 01:35:44 -04:00
Andrew Gallant
e3da726836
Rename search module to search_stream.
...
The name better reflects the difference between it and the search_buffer
module.
2016-09-10 00:08:42 -04:00
Andrew Gallant
5b36c86c15
Rejigger the atty detection stuff.
2016-09-10 00:05:20 -04:00
Andrew Gallant
f83cd63b11
Add integration tests.
2016-09-09 22:58:30 -04:00
Andrew Gallant
cc6b6dcf5b
fix windows build
2016-09-09 08:53:10 -04:00
Andrew Gallant
0766617e07
Refactor how coloring is done.
...
All in the name of appeasing Windows.
2016-09-08 21:46:14 -04:00
Andrew Gallant
a744ec133d
Rename xrep to ripgrep.
2016-09-08 16:15:44 -04:00
Andrew Gallant
0042dce949
Hack in Windows console coloring.
...
The code has suffered and needs refactoring/commenting. BUT... IT WORKS!
2016-09-07 21:54:28 -04:00
Andrew Gallant
ca058d7584
Add support for memory maps.
...
I though plain `read` had usurped them, but when searching a very small
number of files, mmaps can be around 20% faster on Linux. It'd be really
unfortunate to leave that on the table.
Mmap searching doesn't support contexts yet, but we probably don't really
care. And duplicating that logic doesn't sound fun. Without contexts, mmap
searching is delightfully simple.
2016-09-06 21:47:33 -04:00
Andrew Gallant
5938bed339
Add support for printing column numbers.
2016-09-06 19:50:27 -04:00
Andrew Gallant
feff1849c8
Tweak colors.
2016-09-06 19:35:52 -04:00
Andrew Gallant
9948e0ca07
Only create the Grep searcher once.
2016-09-06 19:33:19 -04:00
Andrew Gallant
af48aaa647
another try
2016-09-05 21:57:57 -04:00
Andrew Gallant
ee7f300ae2
windows debug, take 1
2016-09-05 21:46:11 -04:00
Andrew Gallant
a4d8db16f7
Fix glob tests.
...
When matching directly with a regex, we need to make sure the path is
normalized first.
2016-09-05 21:36:19 -04:00
Andrew Gallant
3bb387abdd
Fix glob problem on Windows.
...
We weren't actually escaping every use of the file path separator. D'oh.
2016-09-05 21:20:19 -04:00
Andrew Gallant
7f0273c347
Fix yellow color to match ack.
2016-09-05 21:19:56 -04:00
Andrew Gallant
5b42999a3d
windows, take 3
2016-09-05 21:02:08 -04:00