1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00
Commit Graph

864 Commits

Author SHA1 Message Date
Zoltan Kalmar
948821753c Add Google Closure Templates type (.soy) 2017-11-16 07:07:56 -05:00
Igor Gnatenko
d2a3b61220 bump crossbeam to 0.3 2017-11-10 13:08:34 -05:00
Jesse Claven
acb57eb4ad Add Protocol Buffer file type. 2017-11-08 08:17:42 -05:00
Reuben D'Netto
256aeb5546 Added example for --colors to README 2017-11-03 06:46:29 -04:00
Francois Ferrand
a9377da624 Support ripgrep-bin installation with linuxbrew 2017-11-01 07:11:52 -04:00
Martin Lindhe
c794ef2f04 fix some typos 2017-11-01 07:10:54 -04:00
Brian Campbell
8b9eba2147 Properly match the rules "**/" and "!**/"
When processing a rule that ends in a slash, we strip it off and set the
`is_only_dir` flag.  We then apply the rule that paths that aren't
absolute should be given an implicit `**/` prefix, while avoiding
adding that prefix if it already exists.

However, this means that we miss the case in which we had already
stripped off the trailing slash and set `is_only_dir`.  Correct this
by also explicitly checking for that case.

Fixes #649
2017-11-01 07:10:33 -04:00
Christoph Michelbach
c4732ca012 Correct spelling mistakes in readme file. 2017-11-01 07:09:34 -04:00
Andrew Gallant
1aec4b1123
update brew tap 2017-10-22 11:15:11 -04:00
Andrew Gallant
c4e1945384
cargo: bump to 0.7.1 2017-10-22 10:33:09 -04:00
Andrew Gallant
04d17040e7
changelog 0.7.1 2017-10-22 10:31:42 -04:00
Andrew Gallant
8c8c83a1f8
deps: bump ignore to 0.3.1 2017-10-22 10:31:42 -04:00
Andrew Gallant
5714dbde09
ignore: partially revert symlink loop check optimization
This optimization wasn't tested too carefully, and it seems to result
in a massive amount of file handles open simultaneously. This is likely
a result of the parallel iterator, where many directories are being
traversed simultaneously.

Fixes #648
2017-10-22 10:31:34 -04:00
Andrew Gallant
311ccb1f6b
update brew tap 2017-10-22 08:08:49 -04:00
Andrew Gallant
efa4de8126
cargo: bump to 0.7.0 2017-10-21 22:40:10 -04:00
Andrew Gallant
ad5fa56490
changelog 0.7.0 2017-10-21 22:40:10 -04:00
Andrew Gallant
1bf9d29259
ignore: be fastidious with file handles
This commit fixes the symlink loop checker in the parallel directory
traverser to open fewer handles at the expense of keeping handles held
open longer.

This roughly matches the corresponding change in walkdir:
5bcc5b87ee

Fixes #633
2017-10-21 22:40:10 -04:00
Andrew Gallant
2a14bf2249
printer: fix colors on empty matches
This fixes a bug where a "match" color escape was erroneously emitted
after the new line character. This is because `^` is actually allowed to
match after the end of a trailing new line, which means `^$` matches both
before and after the trailing new line when multiline mode is enabled.
The trailing match was causing the phantom escape sequence to appear,
which we don't want.

Incidentally, this is the root cause of #441 as well, although this commit
doesn't fix that issue, since the line itself is printed before we detect
the phantom match.

Fixes #599
2017-10-21 22:40:10 -04:00
Andrew Gallant
f0028a66ec
style 2017-10-21 22:40:10 -04:00
Andrew Gallant
08060a2105
deps: update everything 2017-10-21 22:40:09 -04:00
Andrew Gallant
cd575d99f8
ignore: upgrade to walkdir 2
The uninteresting bits of this commit involve mechanical changes for
updates to walkdir 2. The more interesting bits of this commit are the
breaking changes, although none of them should require any significant
change on users of this library. The breaking changes are as follows:

* `DirEntry::path_is_symbolic_link` has been renamed to
  `DirEntry::path_is_symlink`. This matches the conventions in the
  standard library, and also the corresponding name change in walkdir.
* Removed the `From<walkdir::Error> for ignore::Error` impl. This was
  intended to only be used internally, but was the only thing that
  made `walkdir` a public dependency of `ignore`. Therefore, we remove
  it since it seems unnecessary.
* Renamed `WalkBuilder::sort_by` to `WalkBuilder::sort_by_file_name`,
  and changed the type of the comparator from

    Fn(&OsString, &OsString) -> cmp::Ordering + 'static

  to

    Fn(&OsStr, &OsStr) -> cmp::Ordering + Send + Sync + 'static

  The corresponding change in `walkdir` retains the `sort_by` name, but
  gives the comparator a pair of `&DirEntry` values instead of a pair
  of `&OsStr` values. Ideally, `ignore` would hand off its own pair of
  `&ignore::DirEntry` values, but this requires more design work. So for
  now, we retain previous functionality, but leave room to make a proper
  `sort_by` method.

[breaking-change]
2017-10-21 22:40:09 -04:00
Andrew Gallant
1267f01c24
deps: upgrade to memchr 2 2017-10-21 22:40:09 -04:00
Andrew Gallant
322d5515e5
style: 80 cols 2017-10-21 22:40:09 -04:00
Shubham Lagwankar
f4770c2094 Fix typos 2017-10-21 22:38:01 -04:00
Evgeny Kulikov
f887bc1f86
printer: --only-matching works with --replace
When -o/--only-matching is used with -r/--replace, the replacement works
as expected. This is not a breaking change because the flags were
previously set to conflict.
2017-10-20 20:58:27 -04:00
Sebastian Nowicki
363a4fa9b7 Fix path passed to try_create_bytes() 2017-10-20 20:51:12 -04:00
Sebastian Nowicki
712311fdc6 Don't create command until we know we can test it
For regression 210 we may not actually need to test anything if the file
system doesn't support creating files with invalid UTF-8 bytes. Don't
create the command until we know there will be an assertion.
2017-10-20 20:51:12 -04:00
Sebastian Nowicki
0d2354aca6 Wrap comments to 79 columns 2017-10-20 20:51:12 -04:00
Sebastian Nowicki
8dc513b5d2 Skip regression 210 test on APFS
APFS does not support creating filenames with invalid UTF-8 byte codes,
thus this test doesn't make sense. Skip it on file systems where this
shouldn't be possible.

Fixes #559
2017-10-20 20:51:12 -04:00
TJ Rana
a98156e71c Fix minor typos
Update name Mac OS X to macOS
2017-10-14 07:02:03 -04:00
Trent Davis
cf94072429 State the default case sensitivity 2017-10-12 20:02:33 -04:00
James Smith
db14046de4 Add purescript to built-in types
Purescript is a functional language that compiles to javascript (https://github.com/purescript/purescript)
2017-10-12 20:02:25 -04:00
dana
36091591f0 Add troubleshooting notes re: conflicting tools/aliases 2017-10-12 06:40:38 -04:00
Andrew Gallant
12ffcb4296
readme: clarify intro 2017-10-10 18:33:23 -04:00
Antti Keränen
e7c06b92fb Fix printing context after an early return from a search
Print the context if there's a context left to be printed after
returning early from a search (because of --max-count).

Fixes #402.
2017-10-08 08:10:35 -04:00
dana
353806b87a Type improvements (config, license, sh, systemd, &c.)
- Add `license` type for various copyright/licence files
- Add `systemd` type for systemd config/unit files
- Update existing `config`, `jinja`, `json`, `sh`, `sql`, `xml`, `yaml` types
- Minor formatting improvements
2017-10-08 08:05:28 -04:00
Omer Katz
aebb132a86 Addressed code reivew. 2017-10-08 08:03:00 -04:00
Omer Katz
ab4b6ab9c3 Ripgrep installs from Linuxbrew just fine and works as expected.
Mentioned it in the README file :)
2017-10-08 08:03:00 -04:00
Félix Cantournet
413178bc2c Add support for Dockerfiles filtering 2017-10-08 08:02:31 -04:00
dana
58fb4f987e Update README to be more explicit about precompiled binaries (fixes #618) 2017-10-08 08:02:19 -04:00
Benjamin Sago
4f1d6af296 globset README version bump 2017-10-08 08:01:50 -04:00
Daniel Vergeylen
6b79349f83 Rewording README
Trial to stay consistent with rest of the text.
Rewording by native english.
2017-10-08 08:01:29 -04:00
Daniel Vergeylen
f858828f61 Update README
Notify user `cargo install ripgrep` contains debug symbols and informs how to stripe them.
2017-10-08 08:01:29 -04:00
James McCoy
67b835fe2a Color --replace text using the match type
Closes #521
2017-10-08 08:01:11 -04:00
Tri Nguyen
214f2bef66 add support for terraform file type 2017-09-23 11:29:09 -04:00
Christof Marti
1136f8adab Avoid expensive check with --files (fixes #600) 2017-09-18 11:54:48 -04:00
Dan Fabulich
beb010d004 doc: clarify --with-filename behavior with --heading 2017-09-06 08:25:05 -04:00
Andrew Gallant
f9cbf7d3d4
tweak working 2017-09-04 11:15:14 -04:00
Philip Munksgaard
7eb1dd129e Add support for Standard ML file types 2017-09-04 07:26:47 -04:00
Alex Burka
a5f82e8826 ignore: add grouped toggle for standard filters 2017-09-02 12:28:59 -04:00