mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-02 05:02:01 -07:00
Compare commits
18 Commits
grep-cli-0
...
grep-print
Author | SHA1 | Date | |
---|---|---|---|
|
ce80d794c0 | ||
|
c5d467a2ab | ||
|
a62cd553c2 | ||
|
ce5188335b | ||
|
b7a456ae83 | ||
|
d14f0b37d6 | ||
|
3ddc3c040f | ||
|
eeaa42ecaf | ||
|
3797a2a5cb | ||
|
0e2f8f7b47 | ||
|
3dd4b77dfb | ||
|
3b5cdea862 | ||
|
54b3e9eb10 | ||
|
56e8864426 | ||
|
b8f619d16e | ||
|
83dff33326 | ||
|
003c3695f4 | ||
|
10777c150d |
@@ -93,7 +93,6 @@ deploy:
|
|||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
condition: $TRAVIS_RUST_VERSION = nightly
|
condition: $TRAVIS_RUST_VERSION = nightly
|
||||||
branch: master
|
|
||||||
tags: true
|
tags: true
|
||||||
api_key:
|
api_key:
|
||||||
secure: "IbSnsbGkxSydR/sozOf1/SRvHplzwRUHzcTjM7BKnr7GccL86gRPUrsrvD103KjQUGWIc1TnK1YTq5M0Onswg/ORDjqa1JEJPkPdPnVh9ipbF7M2De/7IlB4X4qXLKoApn8+bx2x/mfYXu4G+G1/2QdbaKK2yfXZKyjz0YFx+6CNrVCT2Nk8q7aHvOOzAL58vsG8iPDpupuhxlMDDn/UhyOWVInmPPQ0iJR1ZUJN8xJwXvKvBbfp3AhaBiAzkhXHNLgBR8QC5noWWMXnuVDMY3k4f3ic0V+p/qGUCN/nhptuceLxKFicMCYObSZeUzE5RAI0/OBW7l3z2iCoc+TbAnn+JrX/ObJCfzgAOXAU3tLaBFMiqQPGFKjKg1ltSYXomOFP/F7zALjpvFp4lYTBajRR+O3dqaxA9UQuRjw27vOeUpMcga4ZzL4VXFHzrxZKBHN//XIGjYAVhJ1NSSeGpeJV5/+jYzzWKfwSagRxQyVCzMooYFFXzn8Yxdm3PJlmp3GaAogNkdB9qKcrEvRINCelalzALPi0hD/HUDi8DD2PNTCLLMo6VSYtvc685Zbe+KgNzDV1YyTrRCUW6JotrS0r2ULLwnsh40hSB//nNv3XmwNmC/CmW5QAnIGj8cBMF4S2t6ohADIndojdAfNiptmaZOIT6owK7bWMgPMyopo="
|
secure: "IbSnsbGkxSydR/sozOf1/SRvHplzwRUHzcTjM7BKnr7GccL86gRPUrsrvD103KjQUGWIc1TnK1YTq5M0Onswg/ORDjqa1JEJPkPdPnVh9ipbF7M2De/7IlB4X4qXLKoApn8+bx2x/mfYXu4G+G1/2QdbaKK2yfXZKyjz0YFx+6CNrVCT2Nk8q7aHvOOzAL58vsG8iPDpupuhxlMDDn/UhyOWVInmPPQ0iJR1ZUJN8xJwXvKvBbfp3AhaBiAzkhXHNLgBR8QC5noWWMXnuVDMY3k4f3ic0V+p/qGUCN/nhptuceLxKFicMCYObSZeUzE5RAI0/OBW7l3z2iCoc+TbAnn+JrX/ObJCfzgAOXAU3tLaBFMiqQPGFKjKg1ltSYXomOFP/F7zALjpvFp4lYTBajRR+O3dqaxA9UQuRjw27vOeUpMcga4ZzL4VXFHzrxZKBHN//XIGjYAVhJ1NSSeGpeJV5/+jYzzWKfwSagRxQyVCzMooYFFXzn8Yxdm3PJlmp3GaAogNkdB9qKcrEvRINCelalzALPi0hD/HUDi8DD2PNTCLLMo6VSYtvc685Zbe+KgNzDV1YyTrRCUW6JotrS0r2ULLwnsh40hSB//nNv3XmwNmC/CmW5QAnIGj8cBMF4S2t6ohADIndojdAfNiptmaZOIT6owK7bWMgPMyopo="
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
0.10.0 (TBD)
|
0.10.0 (2018-09-07)
|
||||||
============
|
===================
|
||||||
This is a new minor version release of ripgrep that contains some major new
|
This is a new minor version release of ripgrep that contains some major new
|
||||||
features, a huge number of bug fixes, and is the first release based on
|
features, a huge number of bug fixes, and is the first release based on
|
||||||
libripgrep. The entirety of ripgrep's core search and printing code has been
|
libripgrep. The entirety of ripgrep's core search and printing code has been
|
||||||
|
140
Cargo.lock
generated
140
Cargo.lock
generated
@@ -53,7 +53,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.0.23"
|
version = "1.0.24"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -153,40 +153,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "globset"
|
name = "globset"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep"
|
name = "grep"
|
||||||
version = "0.2.0"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"grep-cli 0.1.0",
|
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"grep-matcher 0.1.0",
|
"grep-cli 0.1.1",
|
||||||
"grep-pcre2 0.1.0",
|
"grep-matcher 0.1.1",
|
||||||
"grep-printer 0.1.0",
|
"grep-pcre2 0.1.1",
|
||||||
"grep-regex 0.1.0",
|
"grep-printer 0.1.1",
|
||||||
"grep-searcher 0.1.0",
|
"grep-regex 0.1.1",
|
||||||
|
"grep-searcher 0.1.1",
|
||||||
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-cli"
|
name = "grep-cli"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"globset 0.4.1",
|
"globset 0.4.2",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -194,41 +196,41 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-matcher"
|
name = "grep-matcher"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-pcre2"
|
name = "grep-pcre2"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"grep-matcher 0.1.0",
|
"grep-matcher 0.1.1",
|
||||||
"pcre2 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pcre2 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-printer"
|
name = "grep-printer"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"grep-matcher 0.1.0",
|
"grep-matcher 0.1.1",
|
||||||
"grep-regex 0.1.0",
|
"grep-regex 0.1.1",
|
||||||
"grep-searcher 0.1.0",
|
"grep-searcher 0.1.1",
|
||||||
"serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-regex"
|
name = "grep-regex"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"grep-matcher 0.1.0",
|
"grep-matcher 0.1.1",
|
||||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -236,29 +238,29 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-searcher"
|
name = "grep-searcher"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytecount 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytecount 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"encoding_rs 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding_rs 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"encoding_rs_io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding_rs_io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"grep-matcher 0.1.0",
|
"grep-matcher 0.1.1",
|
||||||
"grep-regex 0.1.0",
|
"grep-regex 0.1.1",
|
||||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ignore"
|
name = "ignore"
|
||||||
version = "0.4.3"
|
version = "0.4.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-channel 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crossbeam-channel 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"globset 0.4.1",
|
"globset 0.4.2",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -295,7 +297,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.4"
|
version = "0.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -369,7 +371,7 @@ name = "pcre2"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pcre2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pcre2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -381,7 +383,7 @@ name = "pcre2-sys"
|
|||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -393,7 +395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "0.4.15"
|
version = "0.4.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -404,7 +406,7 @@ name = "quote"
|
|||||||
version = "0.6.8"
|
version = "0.6.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -449,7 +451,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -477,18 +479,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ripgrep"
|
name = "ripgrep"
|
||||||
version = "0.9.0"
|
version = "0.10.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"grep 0.2.0",
|
"grep 0.2.2",
|
||||||
"ignore 0.4.3",
|
"ignore 0.4.4",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -517,27 +519,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.75"
|
version = "1.0.77"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.75"
|
version = "1.0.77"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"syn 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.26"
|
version = "1.0.27"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -565,10 +567,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "0.14.9"
|
version = "0.15.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -708,7 +710,7 @@ dependencies = [
|
|||||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||||
"checksum bytecount 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f861d9ce359f56dbcb6e0c2a1cb84e52ad732cadb57b806adeb3c7668caccbd8"
|
"checksum bytecount 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f861d9ce359f56dbcb6e0c2a1cb84e52ad732cadb57b806adeb3c7668caccbd8"
|
||||||
"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781"
|
"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781"
|
||||||
"checksum cc 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)" = "c37f0efaa4b9b001fa6f02d4b644dee4af97d3414df07c51e3e4f015f3a3e131"
|
"checksum cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "70f2a88c2e69ceee91c209d8ef25b81fc1a65f42c7f14dfd59d1fed189e514d1"
|
||||||
"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3"
|
"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3"
|
||||||
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
|
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
|
||||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||||
@@ -725,7 +727,7 @@ dependencies = [
|
|||||||
"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
|
"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
|
||||||
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
|
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
|
||||||
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
|
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
|
||||||
"checksum log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cba860f648db8e6f269df990180c2217f333472b4a6e901e97446858487971e2"
|
"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f"
|
||||||
"checksum memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3b4142ab8738a78c51896f704f83c11df047ff1bda9a92a661aa6361552d93d"
|
"checksum memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3b4142ab8738a78c51896f704f83c11df047ff1bda9a92a661aa6361552d93d"
|
||||||
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
|
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
|
||||||
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
|
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
|
||||||
@@ -737,28 +739,28 @@ dependencies = [
|
|||||||
"checksum pcre2 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c16ec0e30c17f938a2da8ff970ad9a4100166d0538898dcc035b55c393cab54"
|
"checksum pcre2 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c16ec0e30c17f938a2da8ff970ad9a4100166d0538898dcc035b55c393cab54"
|
||||||
"checksum pcre2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a9027f9474e4e13d3b965538aafcaebe48c803488ad76b3c97ef061a8324695f"
|
"checksum pcre2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a9027f9474e4e13d3b965538aafcaebe48c803488ad76b3c97ef061a8324695f"
|
||||||
"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
|
"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
|
||||||
"checksum proc-macro2 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "295af93acfb1d5be29c16ca5b3f82d863836efd9cb0c14fd83811eb9a110e452"
|
"checksum proc-macro2 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "afa4d377067cc02eb5e0b491d3f7cfbe145ad4da778535bfb13c444413dd35b9"
|
||||||
"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5"
|
"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5"
|
||||||
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
|
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
|
||||||
"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
|
"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
|
||||||
"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2"
|
"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2"
|
||||||
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
||||||
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
||||||
"checksum regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "67d0301b0c6804eca7e3c275119d0b01ff3b7ab9258a65709e608a66312a1025"
|
"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341"
|
||||||
"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
|
"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
|
||||||
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
|
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
|
||||||
"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7"
|
"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7"
|
||||||
"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
|
"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
|
||||||
"checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c"
|
"checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c"
|
||||||
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
|
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
|
||||||
"checksum serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)" = "22d340507cea0b7e6632900a176101fea959c7065d93ba555072da90aaaafc87"
|
"checksum serde 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)" = "c6e67977d7523ce4d9284ed58918af99392de8edb6192c44afefcf634654ab7f"
|
||||||
"checksum serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)" = "234fc8b737737b148ccd625175fc6390f5e4dacfdaa543cb93a3430d984a9119"
|
"checksum serde_derive 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)" = "5569c52faae3e21b9abae2cc5cfbb56ed008bfcac480ad62bc241b828f0b0aee"
|
||||||
"checksum serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "44dd2cfde475037451fa99b7e5df77aa3cfd1536575fa8e7a538ab36dcde49ae"
|
"checksum serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "59790990c5115d16027f00913e2e66de23a51f70422e549d2ad68c8c5f268f1c"
|
||||||
"checksum simd 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3686dd9418ebcc3a26a0c0ae56deab0681e53fe899af91f5bbcee667ebffb1"
|
"checksum simd 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3686dd9418ebcc3a26a0c0ae56deab0681e53fe899af91f5bbcee667ebffb1"
|
||||||
"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d"
|
"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d"
|
||||||
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
||||||
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
||||||
"checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741"
|
"checksum syn 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "85fb2f7f9b7a4c8df2c913a852de570efdb40f0d2edd39c8245ad573f5c7fbcc"
|
||||||
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
||||||
"checksum termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3bac0e465b59f194e7037ed404b0326e56ff234d767edc4c5cc9cd49e7a2c7"
|
"checksum termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3bac0e465b59f194e7037ed404b0326e56ff234d767edc4c5cc9cd49e7a2c7"
|
||||||
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
||||||
|
32
Cargo.toml
32
Cargo.toml
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ripgrep"
|
name = "ripgrep"
|
||||||
version = "0.9.0" #:version
|
version = "0.10.0" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
ripgrep is a line-oriented search tool that recursively searches your current
|
ripgrep is a line-oriented search tool that recursively searches your current
|
||||||
@@ -45,14 +45,14 @@ members = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
grep = { version = "0.2.0", path = "grep" }
|
grep = { version = "0.2.2", path = "grep" }
|
||||||
ignore = { version = "0.4.0", path = "ignore" }
|
ignore = { version = "0.4.4", path = "ignore" }
|
||||||
lazy_static = "1"
|
lazy_static = "1.1.0"
|
||||||
log = "0.4"
|
log = "0.4.5"
|
||||||
num_cpus = "1"
|
num_cpus = "1.8.0"
|
||||||
regex = "1"
|
regex = "1.0.5"
|
||||||
serde_json = "1"
|
serde_json = "1.0.23"
|
||||||
termcolor = "1"
|
termcolor = "1.0.3"
|
||||||
|
|
||||||
[dependencies.clap]
|
[dependencies.clap]
|
||||||
version = "2.32.0"
|
version = "2.32.0"
|
||||||
@@ -60,7 +60,7 @@ default-features = false
|
|||||||
features = ["suggestions"]
|
features = ["suggestions"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
lazy_static = "1"
|
lazy_static = "1.1.0"
|
||||||
|
|
||||||
[build-dependencies.clap]
|
[build-dependencies.clap]
|
||||||
version = "2.32.0"
|
version = "2.32.0"
|
||||||
@@ -68,8 +68,8 @@ default-features = false
|
|||||||
features = ["suggestions"]
|
features = ["suggestions"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde = "1"
|
serde = "1.0.77"
|
||||||
serde_derive = "1"
|
serde_derive = "1.0.77"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
avx-accel = ["grep/avx-accel"]
|
avx-accel = ["grep/avx-accel"]
|
||||||
@@ -91,9 +91,13 @@ assets = [
|
|||||||
["FAQ.md", "usr/share/doc/ripgrep/FAQ", "644"],
|
["FAQ.md", "usr/share/doc/ripgrep/FAQ", "644"],
|
||||||
# The man page is automatically generated by ripgrep's build process, so
|
# The man page is automatically generated by ripgrep's build process, so
|
||||||
# this file isn't actually commited. Instead, to create a dpkg, either
|
# this file isn't actually commited. Instead, to create a dpkg, either
|
||||||
# create a deployment directory and copy the man page to it, or use the
|
# create a deployment/deb directory and copy the man page to it, or use the
|
||||||
# 'ci/build_deb.sh' script.
|
# 'ci/build_deb.sh' script.
|
||||||
["deployment/rg.1", "usr/share/man/man1/rg.1", "644"],
|
["deployment/deb/rg.1", "usr/share/man/man1/rg.1", "644"],
|
||||||
|
# Similarly for shell completions.
|
||||||
|
["deployment/deb/rg.bash", "usr/share/bash-completion/completions/rg", "644"],
|
||||||
|
["deployment/deb/rg.fish", "usr/share/fish/completions/rg.fish", "644"],
|
||||||
|
["deployment/deb/_rg", "usr/share/zsh/vendor-completions/", "644"],
|
||||||
]
|
]
|
||||||
extended-description = """\
|
extended-description = """\
|
||||||
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
||||||
|
@@ -135,8 +135,8 @@ or more of the following:
|
|||||||
* You need a portable and ubiquitous tool. While ripgrep works on Windows,
|
* You need a portable and ubiquitous tool. While ripgrep works on Windows,
|
||||||
macOS and Linux, it is not ubiquitous and it does not conform to any
|
macOS and Linux, it is not ubiquitous and it does not conform to any
|
||||||
standard such as POSIX. The best tool for this job is good old grep.
|
standard such as POSIX. The best tool for this job is good old grep.
|
||||||
* There still exists some other minor feature (or bug) found in another tool
|
* There still exists some other feature (or bug) not listed in this README that
|
||||||
that isn't in ripgrep.
|
you rely on that's in another tool that isn't in ripgrep.
|
||||||
* There is a performance edge case where ripgrep doesn't do well where another
|
* There is a performance edge case where ripgrep doesn't do well where another
|
||||||
tool does do well. (Please file a bug report!)
|
tool does do well. (Please file a bug report!)
|
||||||
* ripgrep isn't possible to install on your machine or isn't available for your
|
* ripgrep isn't possible to install on your machine or isn't available for your
|
||||||
@@ -409,7 +409,10 @@ $ rustup target add x86_64-unknown-linux-musl
|
|||||||
$ cargo build --release --target x86_64-unknown-linux-musl
|
$ cargo build --release --target x86_64-unknown-linux-musl
|
||||||
```
|
```
|
||||||
|
|
||||||
Applying the `--features` flag from above works as expected.
|
Applying the `--features` flag from above works as expected. If you want to
|
||||||
|
build a static executable with MUSL and with PCRE2, then you will need to have
|
||||||
|
`musl-gcc` installed, which might be in a separate package from the actual
|
||||||
|
MUSL library, depending on your Linux distribution.
|
||||||
|
|
||||||
|
|
||||||
### Running tests
|
### Running tests
|
||||||
|
16
appveyor.yml
16
appveyor.yml
@@ -45,11 +45,10 @@ install:
|
|||||||
- rustc -V
|
- rustc -V
|
||||||
- cargo -V
|
- cargo -V
|
||||||
|
|
||||||
# ???
|
# Hack to work around a harmless warning in Appveyor builds?
|
||||||
build: false
|
build: false
|
||||||
|
|
||||||
# Equivalent to Travis' `script` phase
|
# Equivalent to Travis' `script` phase
|
||||||
# TODO modify this phase as you see fit
|
|
||||||
test_script:
|
test_script:
|
||||||
- cargo test --verbose --all --features pcre2
|
- cargo test --verbose --all --features pcre2
|
||||||
|
|
||||||
@@ -60,7 +59,7 @@ before_deploy:
|
|||||||
- copy target\release\rg.exe staging
|
- copy target\release\rg.exe staging
|
||||||
- ps: copy target\release\build\ripgrep-*\out\_rg.ps1 staging
|
- ps: copy target\release\build\ripgrep-*\out\_rg.ps1 staging
|
||||||
- cd staging
|
- cd staging
|
||||||
# release zipfile will look like 'rust-everywhere-v1.2.3-x86_64-pc-windows-msvc'
|
# release zipfile will look like 'ripgrep-1.2.3-x86_64-pc-windows-msvc'
|
||||||
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
|
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
|
||||||
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip
|
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip
|
||||||
|
|
||||||
@@ -73,17 +72,10 @@ deploy:
|
|||||||
provider: GitHub
|
provider: GitHub
|
||||||
# deploy when a new tag is pushed and only on the stable channel
|
# deploy when a new tag is pushed and only on the stable channel
|
||||||
on:
|
on:
|
||||||
# channel to use to produce the release artifacts
|
|
||||||
# NOTE make sure you only release *once* per target
|
|
||||||
# TODO you may want to pick a different channel
|
|
||||||
CHANNEL: stable
|
CHANNEL: stable
|
||||||
appveyor_repo_tag: true
|
APPVEYOR_REPO_TAG: true
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- /\d+\.\d+\.\d+/
|
- /^\d+\.\d+\.\d+$/
|
||||||
- master
|
- master
|
||||||
# - appveyor
|
|
||||||
# - /\d+\.\d+\.\d+/
|
|
||||||
# except:
|
|
||||||
# - master
|
|
||||||
|
@@ -11,7 +11,9 @@ mk_artifacts() {
|
|||||||
if is_arm; then
|
if is_arm; then
|
||||||
cargo build --target "$TARGET" --release
|
cargo build --target "$TARGET" --release
|
||||||
else
|
else
|
||||||
cargo build --target "$TARGET" --release --features 'pcre2'
|
# Technically, MUSL builds will force PCRE2 to get statically compiled,
|
||||||
|
# but we also want PCRE2 statically build for macOS binaries.
|
||||||
|
PCRE2_SYS_STATIC=1 cargo build --target "$TARGET" --release --features 'pcre2'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,14 +18,26 @@ fi
|
|||||||
|
|
||||||
# 'cargo deb' does not seem to provide a way to specify an asset that is
|
# 'cargo deb' does not seem to provide a way to specify an asset that is
|
||||||
# created at build time, such as ripgrep's man page. To work around this,
|
# created at build time, such as ripgrep's man page. To work around this,
|
||||||
# we force a debug build, copy out the man page produced from that build, put
|
# we force a debug build, copy out the man page (and shell completions)
|
||||||
# it into a predictable location and then build the deb, which knows where to
|
# produced from that build, put it into a predictable location and then build
|
||||||
# look.
|
# the deb, which knows where to look.
|
||||||
|
|
||||||
mkdir -p deployment
|
DEPLOY_DIR=deployment/deb
|
||||||
|
mkdir -p "$DEPLOY_DIR"
|
||||||
cargo build
|
cargo build
|
||||||
|
|
||||||
|
# Find and copy man page.
|
||||||
manpage="$(find ./target/debug -name rg.1 -print0 | xargs -0 ls -t | head -n1)"
|
manpage="$(find ./target/debug -name rg.1 -print0 | xargs -0 ls -t | head -n1)"
|
||||||
cp "$manpage" deployment/
|
cp "$manpage" "$DEPLOY_DIR/"
|
||||||
|
|
||||||
|
# Do the same for shell completions.
|
||||||
|
compbash="$(find ./target/debug -name rg.bash -print0 | xargs -0 ls -t | head -n1)"
|
||||||
|
cp "$compbash" "$DEPLOY_DIR/"
|
||||||
|
compfish="$(find ./target/debug -name rg.fish -print0 | xargs -0 ls -t | head -n1)"
|
||||||
|
cp "$compfish" "$DEPLOY_DIR/"
|
||||||
|
compzsh="complete/_rg"
|
||||||
|
cp "$compzsh" "$DEPLOY_DIR/"
|
||||||
|
|
||||||
# Since we're distributing the dpkg, we don't know whether the user will have
|
# Since we're distributing the dpkg, we don't know whether the user will have
|
||||||
# PCRE2 installed, so just do a static build.
|
# PCRE2 installed, so just do a static build.
|
||||||
PCRE2_SYS_STATIC=1 cargo deb
|
PCRE2_SYS_STATIC=1 cargo deb
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "globset"
|
name = "globset"
|
||||||
version = "0.4.1" #:version
|
version = "0.4.2" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Cross platform single glob and glob set matching. Glob set matching is the
|
Cross platform single glob and glob set matching. Glob set matching is the
|
||||||
@@ -19,14 +19,14 @@ name = "globset"
|
|||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
aho-corasick = "0.6.0"
|
aho-corasick = "0.6.8"
|
||||||
fnv = "1.0"
|
fnv = "1.0.6"
|
||||||
log = "0.4"
|
log = "0.4.5"
|
||||||
memchr = "2"
|
memchr = "2.0.2"
|
||||||
regex = "1"
|
regex = "1.0.5"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
glob = "0.2"
|
glob = "0.2.11"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
simd-accel = []
|
simd-accel = []
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-cli"
|
name = "grep-cli"
|
||||||
version = "0.1.0" #:version
|
version = "0.1.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Utilities for search oriented command line applications.
|
Utilities for search oriented command line applications.
|
||||||
@@ -14,12 +14,12 @@ license = "Unlicense/MIT"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
atty = "0.2.11"
|
atty = "0.2.11"
|
||||||
globset = { version = "0.4.1", path = "../globset" }
|
globset = { version = "0.4.2", path = "../globset" }
|
||||||
lazy_static = "1.1"
|
lazy_static = "1.1.0"
|
||||||
log = "0.4"
|
log = "0.4.5"
|
||||||
regex = "1"
|
regex = "1.0.5"
|
||||||
same-file = "1"
|
same-file = "1.0.3"
|
||||||
termcolor = "1"
|
termcolor = "1.0.3"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies.winapi-util]
|
[target.'cfg(windows)'.dependencies.winapi-util]
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-matcher"
|
name = "grep-matcher"
|
||||||
version = "0.1.0" #:version
|
version = "0.1.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
A trait for regular expressions, with a focus on line oriented search.
|
A trait for regular expressions, with a focus on line oriented search.
|
||||||
@@ -14,10 +14,10 @@ license = "Unlicense/MIT"
|
|||||||
autotests = false
|
autotests = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
memchr = "2"
|
memchr = "2.0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
regex = "1"
|
regex = "1.0.5"
|
||||||
|
|
||||||
[[test]]
|
[[test]]
|
||||||
name = "integration"
|
name = "integration"
|
||||||
|
@@ -266,6 +266,16 @@ impl LineTerminator {
|
|||||||
LineTerminatorImp::CRLF => &[b'\r', b'\n'],
|
LineTerminatorImp::CRLF => &[b'\r', b'\n'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if and only if the given slice ends with this line
|
||||||
|
/// terminator.
|
||||||
|
///
|
||||||
|
/// If this line terminator is `CRLF`, then this only checks whether the
|
||||||
|
/// last byte is `\n`.
|
||||||
|
#[inline]
|
||||||
|
pub fn is_suffix(&self, slice: &[u8]) -> bool {
|
||||||
|
slice.last().map_or(false, |&b| b == self.as_byte())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for LineTerminator {
|
impl Default for LineTerminator {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-pcre2"
|
name = "grep-pcre2"
|
||||||
version = "0.1.0" #:version
|
version = "0.1.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Use PCRE2 with the 'grep' crate.
|
Use PCRE2 with the 'grep' crate.
|
||||||
@@ -13,5 +13,5 @@ keywords = ["regex", "grep", "pcre", "backreference", "look"]
|
|||||||
license = "Unlicense/MIT"
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
grep-matcher = { version = "0.1.0", path = "../grep-matcher" }
|
grep-matcher = { version = "0.1.1", path = "../grep-matcher" }
|
||||||
pcre2 = "0.1"
|
pcre2 = "0.1.0"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-printer"
|
name = "grep-printer"
|
||||||
version = "0.1.0" #:version
|
version = "0.1.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
An implementation of the grep crate's Sink trait that provides standard
|
An implementation of the grep crate's Sink trait that provides standard
|
||||||
@@ -18,13 +18,13 @@ default = ["serde1"]
|
|||||||
serde1 = ["base64", "serde", "serde_derive", "serde_json"]
|
serde1 = ["base64", "serde", "serde_derive", "serde_json"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = { version = "0.9", optional = true }
|
base64 = { version = "0.9.2", optional = true }
|
||||||
grep-matcher = { version = "0.1.0", path = "../grep-matcher" }
|
grep-matcher = { version = "0.1.1", path = "../grep-matcher" }
|
||||||
grep-searcher = { version = "0.1.0", path = "../grep-searcher" }
|
grep-searcher = { version = "0.1.1", path = "../grep-searcher" }
|
||||||
termcolor = "1"
|
termcolor = "1.0.3"
|
||||||
serde = { version = "1", optional = true }
|
serde = { version = "1.0.77", optional = true }
|
||||||
serde_derive = { version = "1", optional = true }
|
serde_derive = { version = "1.0.77", optional = true }
|
||||||
serde_json = { version = "1", optional = true }
|
serde_json = { version = "1.0.27", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
grep-regex = { version = "0.1.0", path = "../grep-regex" }
|
grep-regex = { version = "0.1.1", path = "../grep-regex" }
|
||||||
|
@@ -114,39 +114,6 @@ impl<'a> Data<'a> {
|
|||||||
// so we do the easy thing for now.
|
// so we do the easy thing for now.
|
||||||
Data::Text { text: path.to_string_lossy() }
|
Data::Text { text: path.to_string_lossy() }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unused deserialization routines.
|
|
||||||
|
|
||||||
/*
|
|
||||||
fn into_bytes(self) -> Vec<u8> {
|
|
||||||
match self {
|
|
||||||
Data::Text { text } => text.into_bytes(),
|
|
||||||
Data::Bytes { bytes } => bytes,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
|
||||||
fn into_path_buf(&self) -> PathBuf {
|
|
||||||
use std::os::unix::ffi::OsStrExt;
|
|
||||||
|
|
||||||
match self {
|
|
||||||
Data::Text { text } => PathBuf::from(text),
|
|
||||||
Data::Bytes { bytes } => {
|
|
||||||
PathBuf::from(OsStr::from_bytes(bytes))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(unix))]
|
|
||||||
fn into_path_buf(&self) -> PathBuf {
|
|
||||||
match self {
|
|
||||||
Data::Text { text } => PathBuf::from(text),
|
|
||||||
Data::Bytes { bytes } => {
|
|
||||||
PathBuf::from(String::from_utf8_lossy(&bytes).into_owned())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_base64<T, S>(
|
fn to_base64<T, S>(
|
||||||
@@ -178,36 +145,3 @@ where P: AsRef<Path>,
|
|||||||
{
|
{
|
||||||
path.as_ref().map(|p| Data::from_path(p.as_ref())).serialize(ser)
|
path.as_ref().map(|p| Data::from_path(p.as_ref())).serialize(ser)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following are some deserialization helpers, in case we decide to support
|
|
||||||
// deserialization of the above types.
|
|
||||||
|
|
||||||
/*
|
|
||||||
fn from_base64<'de, D>(
|
|
||||||
de: D,
|
|
||||||
) -> Result<Vec<u8>, D::Error>
|
|
||||||
where D: Deserializer<'de>
|
|
||||||
{
|
|
||||||
let encoded = String::deserialize(de)?;
|
|
||||||
let decoded = base64::decode(encoded.as_bytes())
|
|
||||||
.map_err(D::Error::custom)?;
|
|
||||||
Ok(decoded)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn deser_bytes<'de, D>(
|
|
||||||
de: D,
|
|
||||||
) -> Result<Vec<u8>, D::Error>
|
|
||||||
where D: Deserializer<'de>
|
|
||||||
{
|
|
||||||
Data::deserialize(de).map(|datum| datum.into_bytes())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn deser_path<'de, D>(
|
|
||||||
de: D,
|
|
||||||
) -> Result<Option<PathBuf>, D::Error>
|
|
||||||
where D: Deserializer<'de>
|
|
||||||
{
|
|
||||||
Option::<Data>::deserialize(de)
|
|
||||||
.map(|opt| opt.map(|datum| datum.into_path_buf()))
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@@ -239,8 +239,9 @@ impl StandardBuilder {
|
|||||||
/// which may either be in index form (e.g., `$2`) or can reference named
|
/// which may either be in index form (e.g., `$2`) or can reference named
|
||||||
/// capturing groups if present in the original pattern (e.g., `$foo`).
|
/// capturing groups if present in the original pattern (e.g., `$foo`).
|
||||||
///
|
///
|
||||||
/// For documentation on the full format, please see the `Matcher` trait's
|
/// For documentation on the full format, please see the `Capture` trait's
|
||||||
/// `interpolate` method.
|
/// `interpolate` method in the
|
||||||
|
/// [grep-printer](https://docs.rs/grep-printer) crate.
|
||||||
pub fn replacement(
|
pub fn replacement(
|
||||||
&mut self,
|
&mut self,
|
||||||
replacement: Option<Vec<u8>>,
|
replacement: Option<Vec<u8>>,
|
||||||
@@ -1396,7 +1397,7 @@ impl<'a, M: Matcher, W: WriteColor> StandardImpl<'a, M, W> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn has_line_terminator(&self, buf: &[u8]) -> bool {
|
fn has_line_terminator(&self, buf: &[u8]) -> bool {
|
||||||
buf.last() == Some(&self.searcher.line_terminator().as_byte())
|
self.searcher.line_terminator().is_suffix(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_context(&self) -> bool {
|
fn is_context(&self) -> bool {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-regex"
|
name = "grep-regex"
|
||||||
version = "0.1.0" #:version
|
version = "0.1.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Use Rust's regex library with the 'grep' crate.
|
Use Rust's regex library with the 'grep' crate.
|
||||||
@@ -13,9 +13,9 @@ keywords = ["regex", "grep", "search", "pattern", "line"]
|
|||||||
license = "Unlicense/MIT"
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4"
|
log = "0.4.5"
|
||||||
grep-matcher = { version = "0.1.0", path = "../grep-matcher" }
|
grep-matcher = { version = "0.1.1", path = "../grep-matcher" }
|
||||||
regex = "1"
|
regex = "1.0.5"
|
||||||
regex-syntax = "0.6"
|
regex-syntax = "0.6.2"
|
||||||
thread_local = "0.3.6"
|
thread_local = "0.3.6"
|
||||||
utf8-ranges = "1"
|
utf8-ranges = "1.0.1"
|
||||||
|
@@ -323,8 +323,15 @@ impl RegexMatcher {
|
|||||||
/// Create a new matcher from the given pattern using the default
|
/// Create a new matcher from the given pattern using the default
|
||||||
/// configuration, but matches lines terminated by `\n`.
|
/// configuration, but matches lines terminated by `\n`.
|
||||||
///
|
///
|
||||||
/// This returns an error if the given pattern contains a literal `\n`.
|
/// This is meant to be a convenience constructor for using a
|
||||||
/// Other uses of `\n` (such as in `\s`) are removed transparently.
|
/// `RegexMatcherBuilder` and setting its
|
||||||
|
/// [`line_terminator`](struct.RegexMatcherBuilder.html#method.line_terminator)
|
||||||
|
/// to `\n`. The purpose of using this constructor is to permit special
|
||||||
|
/// optimizations that help speed up line oriented search. These types of
|
||||||
|
/// optimizations are only appropriate when matches span no more than one
|
||||||
|
/// line. For this reason, this constructor will return an error if the
|
||||||
|
/// given pattern contains a literal `\n`. Other uses of `\n` (such as in
|
||||||
|
/// `\s`) are removed transparently.
|
||||||
pub fn new_line_matcher(pattern: &str) -> Result<RegexMatcher, Error> {
|
pub fn new_line_matcher(pattern: &str) -> Result<RegexMatcher, Error> {
|
||||||
RegexMatcherBuilder::new()
|
RegexMatcherBuilder::new()
|
||||||
.line_terminator(Some(b'\n'))
|
.line_terminator(Some(b'\n'))
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-searcher"
|
name = "grep-searcher"
|
||||||
version = "0.1.0" #:version
|
version = "0.1.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Fast line oriented regex searching as a library.
|
Fast line oriented regex searching as a library.
|
||||||
@@ -13,17 +13,17 @@ keywords = ["regex", "grep", "egrep", "search", "pattern"]
|
|||||||
license = "Unlicense/MIT"
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytecount = "0.3.1"
|
bytecount = "0.3.2"
|
||||||
encoding_rs = "0.8"
|
encoding_rs = "0.8.6"
|
||||||
encoding_rs_io = "0.1.2"
|
encoding_rs_io = "0.1.2"
|
||||||
grep-matcher = { version = "0.1.0", path = "../grep-matcher" }
|
grep-matcher = { version = "0.1.1", path = "../grep-matcher" }
|
||||||
log = "0.4"
|
log = "0.4.5"
|
||||||
memchr = "2"
|
memchr = "2.0.2"
|
||||||
memmap = "0.6"
|
memmap = "0.6.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
grep-regex = { version = "0.1.0", path = "../grep-regex" }
|
grep-regex = { version = "0.1.1", path = "../grep-regex" }
|
||||||
regex = "1"
|
regex = "1.0.5"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
avx-accel = [
|
avx-accel = [
|
||||||
|
@@ -74,14 +74,11 @@ fn example() -> Result<(), Box<Error>> {
|
|||||||
let mut matches: Vec<(u64, String)> = vec![];
|
let mut matches: Vec<(u64, String)> = vec![];
|
||||||
Searcher::new().search_slice(&matcher, SHERLOCK, UTF8(|lnum, line| {
|
Searcher::new().search_slice(&matcher, SHERLOCK, UTF8(|lnum, line| {
|
||||||
// We are guaranteed to find a match, so the unwrap is OK.
|
// We are guaranteed to find a match, so the unwrap is OK.
|
||||||
eprintln!("LINE: {:?}", line);
|
|
||||||
let mymatch = matcher.find(line.as_bytes())?.unwrap();
|
let mymatch = matcher.find(line.as_bytes())?.unwrap();
|
||||||
matches.push((lnum, line[mymatch].to_string()));
|
matches.push((lnum, line[mymatch].to_string()));
|
||||||
Ok(true)
|
Ok(true)
|
||||||
}))?;
|
}))?;
|
||||||
|
|
||||||
eprintln!("MATCHES: {:?}", matches);
|
|
||||||
|
|
||||||
assert_eq!(matches.len(), 2);
|
assert_eq!(matches.len(), 2);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
matches[0],
|
matches[0],
|
||||||
|
@@ -246,6 +246,53 @@ impl<'a, S: Sink> Sink for &'a mut S {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<S: Sink + ?Sized> Sink for Box<S> {
|
||||||
|
type Error = S::Error;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn matched(
|
||||||
|
&mut self,
|
||||||
|
searcher: &Searcher,
|
||||||
|
mat: &SinkMatch,
|
||||||
|
) -> Result<bool, S::Error> {
|
||||||
|
(**self).matched(searcher, mat)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn context(
|
||||||
|
&mut self,
|
||||||
|
searcher: &Searcher,
|
||||||
|
context: &SinkContext,
|
||||||
|
) -> Result<bool, S::Error> {
|
||||||
|
(**self).context(searcher, context)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn context_break(
|
||||||
|
&mut self,
|
||||||
|
searcher: &Searcher,
|
||||||
|
) -> Result<bool, S::Error> {
|
||||||
|
(**self).context_break(searcher)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn begin(
|
||||||
|
&mut self,
|
||||||
|
searcher: &Searcher,
|
||||||
|
) -> Result<bool, S::Error> {
|
||||||
|
(**self).begin(searcher)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn finish(
|
||||||
|
&mut self,
|
||||||
|
searcher: &Searcher,
|
||||||
|
sink_finish: &SinkFinish,
|
||||||
|
) -> Result<(), S::Error> {
|
||||||
|
(**self).finish(searcher, sink_finish)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Summary data reported at the end of a search.
|
/// Summary data reported at the end of a search.
|
||||||
///
|
///
|
||||||
/// This reports data such as the total number of bytes searched and the
|
/// This reports data such as the total number of bytes searched and the
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep"
|
name = "grep"
|
||||||
version = "0.2.0" #:version
|
version = "0.2.2" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Fast line oriented regex searching as a library.
|
Fast line oriented regex searching as a library.
|
||||||
@@ -13,18 +13,24 @@ keywords = ["regex", "grep", "egrep", "search", "pattern"]
|
|||||||
license = "Unlicense/MIT"
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
grep-cli = { version = "0.1.0", path = "../grep-cli" }
|
grep-cli = { version = "0.1.1", path = "../grep-cli" }
|
||||||
grep-matcher = { version = "0.1.0", path = "../grep-matcher" }
|
grep-matcher = { version = "0.1.1", path = "../grep-matcher" }
|
||||||
grep-pcre2 = { version = "0.1.0", path = "../grep-pcre2", optional = true }
|
grep-pcre2 = { version = "0.1.1", path = "../grep-pcre2", optional = true }
|
||||||
grep-printer = { version = "0.1.0", path = "../grep-printer" }
|
grep-printer = { version = "0.1.1", path = "../grep-printer" }
|
||||||
grep-regex = { version = "0.1.0", path = "../grep-regex" }
|
grep-regex = { version = "0.1.1", path = "../grep-regex" }
|
||||||
grep-searcher = { version = "0.1.0", path = "../grep-searcher" }
|
grep-searcher = { version = "0.1.1", path = "../grep-searcher" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
atty = "0.2.11"
|
atty = "0.2.11"
|
||||||
|
regex = "1"
|
||||||
termcolor = "1"
|
termcolor = "1"
|
||||||
walkdir = "2.2.2"
|
walkdir = "2.2.2"
|
||||||
|
|
||||||
|
[dev-dependencies.clap]
|
||||||
|
version = "2.32.0"
|
||||||
|
default-features = false
|
||||||
|
features = ["suggestions"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
avx-accel = ["grep-searcher/avx-accel"]
|
avx-accel = ["grep-searcher/avx-accel"]
|
||||||
simd-accel = ["grep-searcher/simd-accel"]
|
simd-accel = ["grep-searcher/simd-accel"]
|
||||||
|
@@ -3,10 +3,9 @@ extern crate termcolor;
|
|||||||
extern crate walkdir;
|
extern crate walkdir;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::path::Path;
|
|
||||||
use std::process;
|
use std::process;
|
||||||
use std::result;
|
|
||||||
|
|
||||||
use grep::cli;
|
use grep::cli;
|
||||||
use grep::printer::{ColorSpecs, StandardBuilder};
|
use grep::printer::{ColorSpecs, StandardBuilder};
|
||||||
@@ -15,14 +14,6 @@ use grep::searcher::{BinaryDetection, SearcherBuilder};
|
|||||||
use termcolor::ColorChoice;
|
use termcolor::ColorChoice;
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
|
|
||||||
macro_rules! fail {
|
|
||||||
($($tt:tt)*) => {
|
|
||||||
return Err(From::from(format!($($tt)*)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type Result<T> = result::Result<T, Box<::std::error::Error>>;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if let Err(err) = try_main() {
|
if let Err(err) = try_main() {
|
||||||
eprintln!("{}", err);
|
eprintln!("{}", err);
|
||||||
@@ -30,10 +21,10 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn try_main() -> Result<()> {
|
fn try_main() -> Result<(), Box<Error>> {
|
||||||
let mut args: Vec<OsString> = env::args_os().collect();
|
let mut args: Vec<OsString> = env::args_os().collect();
|
||||||
if args.len() < 2 {
|
if args.len() < 2 {
|
||||||
fail!("Usage: simplegrep <pattern> [<path> ...]");
|
return Err("Usage: simplegrep <pattern> [<path> ...]".into());
|
||||||
}
|
}
|
||||||
if args.len() == 2 {
|
if args.len() == 2 {
|
||||||
args.push(OsString::from("./"));
|
args.push(OsString::from("./"));
|
||||||
@@ -41,7 +32,7 @@ fn try_main() -> Result<()> {
|
|||||||
search(cli::pattern_from_os(&args[1])?, &args[2..])
|
search(cli::pattern_from_os(&args[1])?, &args[2..])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn search(pattern: &str, paths: &[OsString]) -> Result<()> {
|
fn search(pattern: &str, paths: &[OsString]) -> Result<(), Box<Error>> {
|
||||||
let matcher = RegexMatcher::new_line_matcher(&pattern)?;
|
let matcher = RegexMatcher::new_line_matcher(&pattern)?;
|
||||||
let mut searcher = SearcherBuilder::new()
|
let mut searcher = SearcherBuilder::new()
|
||||||
.binary_detection(BinaryDetection::quit(b'\x00'))
|
.binary_detection(BinaryDetection::quit(b'\x00'))
|
||||||
@@ -49,18 +40,20 @@ fn search(pattern: &str, paths: &[OsString]) -> Result<()> {
|
|||||||
.build();
|
.build();
|
||||||
let mut printer = StandardBuilder::new()
|
let mut printer = StandardBuilder::new()
|
||||||
.color_specs(ColorSpecs::default_with_color())
|
.color_specs(ColorSpecs::default_with_color())
|
||||||
.build(cli::stdout(color_choice()));
|
.build(cli::stdout(
|
||||||
|
if cli::is_tty_stdout() {
|
||||||
|
ColorChoice::Auto
|
||||||
|
} else {
|
||||||
|
ColorChoice::Never
|
||||||
|
}
|
||||||
|
));
|
||||||
|
|
||||||
for path in paths {
|
for path in paths {
|
||||||
for result in WalkDir::new(path) {
|
for result in WalkDir::new(path) {
|
||||||
let dent = match result {
|
let dent = match result {
|
||||||
Ok(dent) => dent,
|
Ok(dent) => dent,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!(
|
eprintln!("{}", err);
|
||||||
"{}: {}",
|
|
||||||
err.path().unwrap_or(Path::new("error")).display(),
|
|
||||||
err,
|
|
||||||
);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -79,11 +72,3 @@ fn search(pattern: &str, paths: &[OsString]) -> Result<()> {
|
|||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn color_choice() -> ColorChoice {
|
|
||||||
if cli::is_tty_stdout() {
|
|
||||||
ColorChoice::Auto
|
|
||||||
} else {
|
|
||||||
ColorChoice::Never
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ignore"
|
name = "ignore"
|
||||||
version = "0.4.3" #:version
|
version = "0.4.4" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
A fast library for efficiently matching ignore files such as `.gitignore`
|
A fast library for efficiently matching ignore files such as `.gitignore`
|
||||||
@@ -18,21 +18,21 @@ name = "ignore"
|
|||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
crossbeam-channel = "0.2"
|
crossbeam-channel = "0.2.4"
|
||||||
globset = { version = "0.4.0", path = "../globset" }
|
globset = { version = "0.4.2", path = "../globset" }
|
||||||
lazy_static = "1"
|
lazy_static = "1.1.0"
|
||||||
log = "0.4"
|
log = "0.4.5"
|
||||||
memchr = "2"
|
memchr = "2.0.2"
|
||||||
regex = "1"
|
regex = "1.0.5"
|
||||||
same-file = "1"
|
same-file = "1.0.3"
|
||||||
thread_local = "0.3.2"
|
thread_local = "0.3.6"
|
||||||
walkdir = "2.2.2"
|
walkdir = "2.2.5"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies.winapi-util]
|
[target.'cfg(windows)'.dependencies.winapi-util]
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempdir = "0.3.5"
|
tempdir = "0.3.7"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
simd-accel = ["globset/simd-accel"]
|
simd-accel = ["globset/simd-accel"]
|
||||||
|
33
scripts/copy-examples
Executable file
33
scripts/copy-examples
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from __future__ import absolute_import, division, print_function
|
||||||
|
import argparse
|
||||||
|
import codecs
|
||||||
|
import os.path
|
||||||
|
import re
|
||||||
|
|
||||||
|
RE_EACH_CODE_BLOCK = re.compile(
|
||||||
|
r'(?s)(?:```|\{\{< high rust[^>]+>\}\})[^\n]*\n(.*?)(?:```|\{\{< /high >\}\})' # noqa
|
||||||
|
)
|
||||||
|
RE_MARKER = re.compile(r'^(?:# )?//([^/].*)$')
|
||||||
|
RE_STRIP_COMMENT = re.compile(r'^# ?')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
p = argparse.ArgumentParser()
|
||||||
|
p.add_argument('--rust-file', default='src/cookbook.rs')
|
||||||
|
p.add_argument('--example-dir', default='grep/examples')
|
||||||
|
args = p.parse_args()
|
||||||
|
|
||||||
|
with codecs.open(args.rust_file, encoding='utf-8') as f:
|
||||||
|
rustcode = f.read()
|
||||||
|
for m in RE_EACH_CODE_BLOCK.finditer(rustcode):
|
||||||
|
lines = m.group(1).splitlines()
|
||||||
|
marker, codelines = lines[0], lines[1:]
|
||||||
|
m = RE_MARKER.search(marker)
|
||||||
|
if m is None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
code = '\n'.join(RE_STRIP_COMMENT.sub('', line) for line in codelines)
|
||||||
|
fpath = os.path.join(args.example_dir, m.group(1))
|
||||||
|
with codecs.open(fpath, mode='w+', encoding='utf-8') as f:
|
||||||
|
print(code, file=f)
|
Reference in New Issue
Block a user