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

907 Commits

Author SHA1 Message Date
e2516ed095 globset: support backslash escaping
From `man 7 glob`:

    One can remove the special meaning of '?', '*' and '[' by preceding
    them by a backslash, or, in case this is part of a shell command
    line, enclosing them in quotes.

Conform to glob / fnmatch / git implementations by making `\` escape the
following character - for example `\?` will match a literal `?`.

However, only enable this by default on Unix platforms. Windows builds
will continue to use `\` as a path separator, but can still get the new
behavior by calling `globset.backslash_escape(true)`.

Adding tests for the `Globset::backslash_escape` option was a bit
involved, since the default value of this option is platform-dependent.

Extend the options framework to hold an `Option<T>` for each
knob, where `None` means "default" and `Some(v)` means "override with
`v`". This way we only have to specify the default values once in
`GlobOptions::default()` rather than replicated in both code and tests.

Finally write a few behavioral tests, and some tests to confirm it
varies by platform.
2018-03-10 09:30:55 -05:00
c0c80e0209 doc: add Windows Scoop install instructions 2018-03-10 08:15:22 -05:00
dbf6f15625 mmap: handle ENOMEM error
This commit causes a memory map strategy to fall back to a file backed
strategy if the mmap call fails with an `ENOMEM` error.

Fixes #852
2018-03-10 08:13:27 -05:00
9163aaac27 doc: add additional instructions for snap
In the snap store, ripgrep 0.8.1 is only available as a candidate
release, while the default (stable) release is 0.7.1.
2018-03-09 07:09:02 -05:00
9d7448bfc0 doc: shorten Rust nightly brew install command
The burntsushi/ripgrep/ prefix is not needed.
2018-03-07 12:44:06 -05:00
b98585b429 termcolor/doc: fix typo 2018-03-03 09:20:28 -05:00
f5411b992c doc: use PATTERNFILE for -f/--file flag
Fixes #832
2018-02-23 12:18:15 -05:00
492effc7be pkg: update snapcraft.yaml
Update version number and don't declare alias as it has been deprecated.
2018-02-23 06:51:39 -05:00
4889d2d37c doc: clarify licensing story 2018-02-22 19:01:43 -05:00
354996a16f doc: clarify snap installation instructions
Fixes #782
2018-02-22 16:56:22 -05:00
cbebb010a7 doc: fix typos 2018-02-21 15:59:12 -05:00
7098daf6a8 doc: "to rip" means "fast"
Answer the origin story of ripgrep's name.
2018-02-21 15:53:50 -05:00
17d09c0882 pkg: update brew tap to 0.8.1 2018-02-20 21:51:41 -05:00
c8e9f25b85 ci: fix macOS asciidoc installation 0.8.1 2018-02-20 21:05:40 -05:00
9305f89f39 ci: fix man page generation on macOS 2018-02-20 20:55:12 -05:00
9c216ad9a4 release: 0.8.1 2018-02-20 20:19:03 -05:00
6862e07870 changelog: 0.8.1 2018-02-20 20:18:01 -05:00
a6d09b2d42 deps: update to clap 2.30.0 2018-02-20 20:16:57 -05:00
ab1b877c20 termcolor: release 0.3.5 termcolor-0.3.5 2018-02-20 20:15:08 -05:00
2b5c488814 ignore: release 0.4.1 ignore-0.4.1 2018-02-20 20:13:56 -05:00
cb47be938e ci: build man page on ARM cross-compile
This fixes a bug where ripgrep's man page wasn't generated in the ARM
cross-compile build. Mostly, this should just require installing
asciidoc and making sure we test that it actually works.

Fixes #791
2018-02-20 20:05:55 -05:00
fe9be658f4 doc: omit revision when it isn't available
If the revision is empty, then we shouldn't show the `(rev )` text in
the output of `rg --version`.

Fixes #789
2018-02-20 20:05:55 -05:00
8c800adab7 doc: clarify failure mode
This adds a hint for end users that run into a common failure mode where
ripgrep won't search any files because they have a `*` rule in their
`$HOME/.gitignore`.

Fixes #815
2018-02-20 20:05:55 -05:00
d65966efbc ignore: fix performance regression on Windows
This commit fixes a performance regression in Windows that resulted from
fallout from fixing #705. In particular, we introduced an additional
stat call for every single directory entry, which can be quite
disastrous for performance.

There is a corresponding companion PR that fixes the same bug in
walkdir: https://github.com/BurntSushi/walkdir/pull/96

Fixes #820
2018-02-20 19:50:52 -05:00
597bf04a56 termcolor: add ?Sized bound for &mut T impl 2018-02-20 07:13:37 -05:00
c78ab9e669 termcolor: improve "intense" docs
Fixes #797
2018-02-20 07:11:25 -05:00
d57fc58081 termcolor: add underline support
This commit adds underline support to the termcolor crate, and
exposes it through ripgrep.

Fixes #798
2018-02-20 07:10:03 -05:00
d09538c974 doc: clarify Debian/Ubuntu install instructions
Thanks @x4121 for the tip!
2018-02-20 07:02:08 -05:00
94768881e1 doc: fix typo in Debian install instructions 2018-02-20 06:59:21 -05:00
f3a9ced82c types: add csv 2018-02-19 20:59:15 -05:00
18f549d289 ignore: fix symlink following on Windows
This commit fixes a bug where symlinks were always being followed on
Windows, even if the user did not request it. This only impacts the
parallel iterator.

This is a regression from the fallout of fixing #705.

Fixes #824
2018-02-19 20:52:37 -05:00
c749b604dc doc: clarify --ignore-file flag
Fixes #684
2018-02-18 17:53:10 -05:00
d6748a3445 doc: add .deb installation instructions
Generating a Debian binary package was pretty easy using `cargo deb`, so
it is now part of the release. This commit updates the README's
installation methods to reference it.

I did look into setting up a PPA for Ubuntu, but my eyes glazed over while
reading the documentation. Providing a binary Debian package is likely a
faux pas, but it is extraordinarily convenient.
2018-02-18 10:32:53 -05:00
9b7f420faa doc: fix files-with-matches typo 2018-02-17 08:24:31 -05:00
361698b90a ignore: fix improper hidden filtering
This commit fixes a bug where `rg --hidden .` would behave differently
with respect to ignore filtering than `rg --hidden ./`. In particular,
this was due to a bug where the directory name `.` caused the leading
`.` in a hidden directory to get stripped, which in turn caused the
ignore rules to fail.

Fixes #807
2018-02-14 18:16:38 -05:00
b71a110ccf ignore: fix custom ignore name bug
This commit fixes a bug in the handling of custom gitignore file names.
Previously, the directory walker would check for whether there were any
ignore rules present, but this check didn't incorporate the custom gitignore
rules. At a high level, this permits custom gitignore names to be used
even if no other source of gitignore rules is used.

Fixes #800
2018-02-14 06:53:26 -05:00
5c1af3c25d types: add VHDL 2018-02-13 07:32:16 -05:00
ad3f55b0e5 doc: the year is 2018 2018-02-12 18:30:02 -05:00
b8e6d50bbe doc: add "grep replacement" question to FAQ
I am tired of being throwing "but ripgrep is marketed as a grep
replacement" in my face. Let's answer it once and for all.
2018-02-12 17:57:14 -05:00
81afe8c5a0 doc: fix typo 2018-02-12 07:16:10 -05:00
c4e0d4bd7b pkg: update brew tap to 0.8.0, take 2 2018-02-11 20:39:12 -05:00
23d1b91ead release: 0.8.0 0.8.0 2018-02-11 20:22:22 -05:00
ac83ed4992 pkg: update brew tap to 0.8.0 2018-02-11 20:19:25 -05:00
555fbd1201 pkg: delete Archlinux PKGBUILD
Other people are maintaining it and it has bitrotted anyway.
2018-02-11 20:18:56 -05:00
f3146f8316 changelog: 0.8.0 2018-02-11 13:57:29 -05:00
56341973ee ignore: release 0.4.0 ignore-0.4.0 2018-02-11 13:42:59 -05:00
a431160d4c globset: release 0.3.0 globset-0.3.0 2018-02-11 13:41:36 -05:00
5d15f49f0c termcolor: release 0.3.4 termcolor-0.3.4 2018-02-11 13:39:12 -05:00
7718ee362e wincolor: release 0.1.6 wincolor-0.1.6 2018-02-11 13:38:00 -05:00
739f8f596b grep: release 0.1.8 grep-0.1.8 2018-02-11 13:35:54 -05:00