1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-25 14:22:54 +02:00
Commit Graph

1049 Commits

Author SHA1 Message Date
ad5fa56490 changelog 0.7.0 2017-10-21 22:40:10 -04:00
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
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
f0028a66ec style 2017-10-21 22:40:10 -04:00
08060a2105 deps: update everything 2017-10-21 22:40:09 -04:00
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
1267f01c24 deps: upgrade to memchr 2 2017-10-21 22:40:09 -04:00
322d5515e5 style: 80 cols 2017-10-21 22:40:09 -04:00
f4770c2094 Fix typos 2017-10-21 22:38:01 -04:00
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
363a4fa9b7 Fix path passed to try_create_bytes() 2017-10-20 20:51:12 -04:00
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
0d2354aca6 Wrap comments to 79 columns 2017-10-20 20:51:12 -04:00
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
a98156e71c Fix minor typos
Update name Mac OS X to macOS
2017-10-14 07:02:03 -04:00
cf94072429 State the default case sensitivity 2017-10-12 20:02:33 -04:00
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
36091591f0 Add troubleshooting notes re: conflicting tools/aliases 2017-10-12 06:40:38 -04:00
12ffcb4296 readme: clarify intro 2017-10-10 18:33:23 -04:00
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
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
aebb132a86 Addressed code reivew. 2017-10-08 08:03:00 -04:00
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
413178bc2c Add support for Dockerfiles filtering 2017-10-08 08:02:31 -04:00
58fb4f987e Update README to be more explicit about precompiled binaries (fixes #618) 2017-10-08 08:02:19 -04:00
4f1d6af296 globset README version bump 2017-10-08 08:01:50 -04:00
6b79349f83 Rewording README
Trial to stay consistent with rest of the text.
Rewording by native english.
2017-10-08 08:01:29 -04:00
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
67b835fe2a Color --replace text using the match type
Closes #521
2017-10-08 08:01:11 -04:00
214f2bef66 add support for terraform file type 2017-09-23 11:29:09 -04:00
1136f8adab Avoid expensive check with --files (fixes #600) 2017-09-18 11:54:48 -04:00
beb010d004 doc: clarify --with-filename behavior with --heading 2017-09-06 08:25:05 -04:00
f9cbf7d3d4 tweak working 2017-09-04 11:15:14 -04:00
7eb1dd129e Add support for Standard ML file types 2017-09-04 07:26:47 -04:00
a5f82e8826 ignore: add grouped toggle for standard filters 2017-09-02 12:28:59 -04:00
ca6bd648ab Add Elm file type. 2017-08-30 06:46:31 -04:00
af77dd55a2 Update encoding_rs to 0.7.0 2017-08-28 08:14:33 -04:00
3065a8c9c8 restore the default SIGPIPE behavior as a temporary workaround
See https://github.com/BurntSushi/ripgrep/issues/200.
2017-08-27 15:01:05 -04:00
208c11af56 deps: bump termcolor in lock file 2017-08-27 11:34:58 -04:00
12a78a992c termcolor-0.3.3 termcolor-0.3.3 2017-08-27 11:05:55 -04:00
d97c80be63 termcolor: make StandardStream be Send
This commit fixes a bug where the `StandardStream` type isn't `Send` on
Windows. This can cause some surprising compile breakage, and the only
motivation for it being non-Send was dubious. Namely, it was a result of
trying to eliminate code duplication.

This refactoring also eliminates at least one "unreachable" panic case
that was a result of trying to eliminate code reuse, so that's a nice
benefit as well.

Fixes #503
2017-08-27 11:05:02 -04:00
5213bd30ea termcolor: 80 cols 2017-08-27 11:05:02 -04:00
82d101907a ignore: document git_global enabled by default 2017-08-26 14:49:40 -04:00
30608f2444 readme: update minimum version 2017-08-23 23:08:21 -04:00
3d323928a0 update brew tap 2017-08-23 22:04:16 -04:00
8b6a3bc858 ci: unpin nightly, redux 0.6.0 2017-08-23 20:05:27 -04:00
e10544f819 0.6.0 2017-08-23 19:54:50 -04:00
dc7e39a6ba cargo: add crates.io badges 2017-08-23 19:54:33 -04:00
36c16eb00c bump deps 2017-08-23 19:52:13 -04:00
fffee61f80 changelog 0.6.0 2017-08-23 19:49:35 -04:00