2016-02-27 11:07:26 -05:00
|
|
|
[package]
|
2016-09-08 16:15:44 -04:00
|
|
|
name = "ripgrep"
|
2017-05-11 19:08:59 -04:00
|
|
|
version = "0.5.2" #:version
|
2016-02-27 11:07:26 -05:00
|
|
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
|
|
|
description = """
|
2016-09-13 21:16:18 -04:00
|
|
|
Line oriented search tool using Rust's regex library. Combines the raw
|
|
|
|
performance of grep with the usability of the silver searcher.
|
2016-02-27 11:07:26 -05:00
|
|
|
"""
|
2016-09-08 16:15:44 -04:00
|
|
|
documentation = "https://github.com/BurntSushi/ripgrep"
|
|
|
|
homepage = "https://github.com/BurntSushi/ripgrep"
|
|
|
|
repository = "https://github.com/BurntSushi/ripgrep"
|
2016-02-27 11:07:26 -05:00
|
|
|
readme = "README.md"
|
|
|
|
keywords = ["regex", "grep", "egrep", "search", "pattern"]
|
2017-01-21 11:31:09 -05:00
|
|
|
categories = ["command-line-utilities", "text-processing"]
|
2016-02-27 11:07:26 -05:00
|
|
|
license = "Unlicense/MIT"
|
2016-10-10 22:24:28 -04:00
|
|
|
exclude = ["HomebrewFormula"]
|
Switch from Docopt to Clap.
There were two important reasons for the switch:
1. Performance. Docopt does poorly when the argv becomes large, which is
a reasonable common use case for search tools. (e.g., use with xargs)
2. Better failure modes. Clap knows a lot more about how a particular
argv might be invalid, and can therefore provide much clearer error
messages.
While both were important, (1) made it urgent.
Note that since Clap requires at least Rust 1.11, this will in turn
increase the minimum Rust version supported by ripgrep from Rust 1.9 to
Rust 1.11. It is therefore a breaking change, so the soonest release of
ripgrep with Clap will have to be 0.3.
There is also at least one subtle breaking change in real usage.
Previous to this commit, this used to work:
rg -e -foo
Where this would cause ripgrep to search for the string `-foo`. Clap
currently has problems supporting this use case
(see: https://github.com/kbknapp/clap-rs/issues/742),
but it can be worked around by using this instead:
rg -e [-]foo
or even
rg [-]foo
and this still works:
rg -- -foo
This commit also adds Bash, Fish and PowerShell completion files to the
release, fixes a bug that prevented ripgrep from working on file
paths containing invalid UTF-8 and shows short descriptions in the
output of `-h` but longer descriptions in the output of `--help`.
Fixes #136, Fixes #189, Fixes #210, Fixes #230
2016-11-12 21:48:11 -05:00
|
|
|
build = "build.rs"
|
2016-02-27 11:07:26 -05:00
|
|
|
|
2016-08-25 21:44:37 -04:00
|
|
|
[[bin]]
|
|
|
|
bench = false
|
|
|
|
path = "src/main.rs"
|
2016-09-08 16:15:44 -04:00
|
|
|
name = "rg"
|
2016-08-25 21:44:37 -04:00
|
|
|
|
2016-09-09 22:58:30 -04:00
|
|
|
[[test]]
|
|
|
|
name = "integration"
|
|
|
|
path = "tests/tests.rs"
|
|
|
|
|
2016-02-27 11:07:26 -05:00
|
|
|
[dependencies]
|
2017-01-15 16:32:30 -05:00
|
|
|
atty = "0.2.2"
|
2016-09-23 04:59:25 +02:00
|
|
|
bytecount = "0.1.4"
|
2017-05-08 18:04:37 -04:00
|
|
|
clap = "2.24.1"
|
2017-06-15 18:32:36 +02:00
|
|
|
encoding_rs = "0.6"
|
2017-02-25 22:56:17 +01:00
|
|
|
env_logger = { version = "0.4", default-features = false }
|
2017-01-13 23:46:21 -05:00
|
|
|
grep = { version = "0.1.5", path = "grep" }
|
2017-07-17 17:56:33 -04:00
|
|
|
ignore = { version = "0.2.2", path = "ignore" }
|
2016-09-05 17:36:41 -04:00
|
|
|
lazy_static = "0.2"
|
2016-08-28 01:37:12 -04:00
|
|
|
log = "0.3"
|
2016-12-30 15:43:29 -05:00
|
|
|
memchr = "1"
|
2016-10-11 19:57:09 -04:00
|
|
|
memmap = "0.5"
|
2016-08-25 21:44:37 -04:00
|
|
|
num_cpus = "1"
|
2017-01-13 23:46:21 -05:00
|
|
|
regex = "0.2.1"
|
Don't search stdout redirected file.
When running ripgrep like this:
rg foo > output
we must be careful not to search `output` since ripgrep is actively writing
to it. Searching it can cause massive blowups where the file grows without
bound.
While this is conceptually easy to fix (check the inode of the redirection
and the inode of the file you're about to search), there are a few problems
with it.
First, inodes are a Unix thing, so we need a Windows specific solution to
this as well. To resolve this concern, I created a new crate, `same-file`,
which provides a cross platform abstraction.
Second, stat'ing every file is costly. This is not avoidable on Windows,
but on Unix, we can get the inode number directly from directory traversal.
However, this information wasn't exposed, but now it is (through both the
ignore and walkdir crates).
Fixes #286
2017-01-08 10:27:30 -05:00
|
|
|
same-file = "0.1.1"
|
2017-02-18 15:09:25 -05:00
|
|
|
termcolor = { version = "0.3.0", path = "termcolor" }
|
2016-08-25 21:44:37 -04:00
|
|
|
|
Switch from Docopt to Clap.
There were two important reasons for the switch:
1. Performance. Docopt does poorly when the argv becomes large, which is
a reasonable common use case for search tools. (e.g., use with xargs)
2. Better failure modes. Clap knows a lot more about how a particular
argv might be invalid, and can therefore provide much clearer error
messages.
While both were important, (1) made it urgent.
Note that since Clap requires at least Rust 1.11, this will in turn
increase the minimum Rust version supported by ripgrep from Rust 1.9 to
Rust 1.11. It is therefore a breaking change, so the soonest release of
ripgrep with Clap will have to be 0.3.
There is also at least one subtle breaking change in real usage.
Previous to this commit, this used to work:
rg -e -foo
Where this would cause ripgrep to search for the string `-foo`. Clap
currently has problems supporting this use case
(see: https://github.com/kbknapp/clap-rs/issues/742),
but it can be worked around by using this instead:
rg -e [-]foo
or even
rg [-]foo
and this still works:
rg -- -foo
This commit also adds Bash, Fish and PowerShell completion files to the
release, fixes a bug that prevented ripgrep from working on file
paths containing invalid UTF-8 and shows short descriptions in the
output of `-h` but longer descriptions in the output of `--help`.
Fixes #136, Fixes #189, Fixes #210, Fixes #230
2016-11-12 21:48:11 -05:00
|
|
|
[build-dependencies]
|
2017-05-08 18:04:37 -04:00
|
|
|
clap = "2.24.1"
|
Switch from Docopt to Clap.
There were two important reasons for the switch:
1. Performance. Docopt does poorly when the argv becomes large, which is
a reasonable common use case for search tools. (e.g., use with xargs)
2. Better failure modes. Clap knows a lot more about how a particular
argv might be invalid, and can therefore provide much clearer error
messages.
While both were important, (1) made it urgent.
Note that since Clap requires at least Rust 1.11, this will in turn
increase the minimum Rust version supported by ripgrep from Rust 1.9 to
Rust 1.11. It is therefore a breaking change, so the soonest release of
ripgrep with Clap will have to be 0.3.
There is also at least one subtle breaking change in real usage.
Previous to this commit, this used to work:
rg -e -foo
Where this would cause ripgrep to search for the string `-foo`. Clap
currently has problems supporting this use case
(see: https://github.com/kbknapp/clap-rs/issues/742),
but it can be worked around by using this instead:
rg -e [-]foo
or even
rg [-]foo
and this still works:
rg -- -foo
This commit also adds Bash, Fish and PowerShell completion files to the
release, fixes a bug that prevented ripgrep from working on file
paths containing invalid UTF-8 and shows short descriptions in the
output of `-h` but longer descriptions in the output of `--help`.
Fixes #136, Fixes #189, Fixes #210, Fixes #230
2016-11-12 21:48:11 -05:00
|
|
|
lazy_static = "0.2"
|
|
|
|
|
2016-08-27 01:01:06 -04:00
|
|
|
[features]
|
2016-11-05 22:44:33 -04:00
|
|
|
avx-accel = ["bytecount/avx-accel"]
|
2017-08-20 09:35:02 +03:00
|
|
|
simd-accel = ["bytecount/simd-accel", "regex/simd-accel", "encoding_rs/simd-accel"]
|
2016-08-27 01:01:06 -04:00
|
|
|
|
2016-02-27 11:07:26 -05:00
|
|
|
[profile.release]
|
|
|
|
debug = true
|