Compare commits

...

8 Commits

Author SHA1 Message Date
Andrew Gallant
699c76f45c fix ci 2016-12-07 11:13:44 -05:00
Andrew Gallant
de33003527 0.3.2 2016-12-07 10:59:06 -05:00
Andrew Gallant
3e943636f4 changelog 0.3.2 2016-12-07 10:58:31 -05:00
Andrew Gallant
3f515afbb4 Fix completion build.rs 2016-12-07 10:32:30 -05:00
Andrew Gallant
30db03bb62 Merge pull request #272 from BurntSushi/fix-270
Fix leading hypen bug by updating clap.
2016-12-07 10:32:01 -05:00
Andrew Gallant
d66812102b Fix leading hypen bug by updating clap.
Fixes #270
2016-12-06 17:29:34 -05:00
Andrew Gallant
86f8c3c818 update Cargo.lock 2016-12-05 20:15:45 -05:00
Andrew Gallant
5eb2ca4338 try removing cache 2016-12-05 20:14:58 -05:00
8 changed files with 59 additions and 18 deletions

View File

@@ -1,5 +1,4 @@
language: rust
cache: cargo
env:
global:

View File

@@ -1,3 +1,28 @@
0.3.2
=====
Feature enhancements:
* Added or improved file type filtering for Less, Sass, stylus, Zsh
Bug fixes:
* [BUG #229](https://github.com/BurntSushi/ripgrep/issues/229):
Make smart case slightly less conservative.
* [BUG #247](https://github.com/BurntSushi/ripgrep/issues/247):
Clarify use of --heading/--no-heading.
* [BUG #251](https://github.com/BurntSushi/ripgrep/issues/251),
[BUG #264](https://github.com/BurntSushi/ripgrep/issues/264),
[BUG #267](https://github.com/BurntSushi/ripgrep/issues/267):
Fix matching bug caused by literal optimizations.
* [BUG #256](https://github.com/BurntSushi/ripgrep/issues/256):
Fix bug that caused `rg foo` and `rg foo/` to have different behavior
when `foo` was a symlink.
* [BUG #270](https://github.com/BurntSushi/ripgrep/issues/270):
Fix bug where patterns starting with a `-` couldn't be used with the
`-e/--regexp` flag. (This resolves a regression that was introduced in
ripgrep 0.3.0.)
0.3.1
=====
Bug fixes:

12
Cargo.lock generated
View File

@@ -1,13 +1,13 @@
[root]
name = "ripgrep"
version = "0.3.1"
version = "0.3.2"
dependencies = [
"bytecount 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ctrlc 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"grep 0.1.4",
"ignore 0.1.5",
"ignore 0.1.6",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -48,7 +48,7 @@ dependencies = [
[[package]]
name = "clap"
version = "2.18.0"
version = "2.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -125,7 +125,7 @@ dependencies = [
[[package]]
name = "ignore"
version = "0.1.5"
version = "0.1.6"
dependencies = [
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"globset 0.1.2",
@@ -333,7 +333,7 @@ dependencies = [
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bytecount 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49e3c21915578e2300b08d3c174a8ac887e0c6421dff86fdc4d741dc29e5d413"
"checksum clap 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "40046b8a004bf3ba43b9078bf4b9b6d1708406a234848f925dbd7160a374c8a8"
"checksum clap 2.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "956cee0b2427dd9e71129a509d1ef17a7f5df9f8253924074d7a5d79bc61851e"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum ctrlc 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77f98bb69e3fefadcc5ca80a1368a55251f70295168203e01165bcaecb270891"
"checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f"

View File

@@ -1,6 +1,6 @@
[package]
name = "ripgrep"
version = "0.3.1" #:version
version = "0.3.2" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
Line oriented search tool using Rust's regex library. Combines the raw
@@ -26,7 +26,7 @@ path = "tests/tests.rs"
[dependencies]
bytecount = "0.1.4"
clap = "~2.18.0"
clap = "~2.19.0"
ctrlc = "2.0"
env_logger = "0.3"
grep = { version = "0.1.4", path = "grep" }

View File

@@ -3,6 +3,7 @@ extern crate clap;
#[macro_use]
extern crate lazy_static;
use std::env;
use std::fs;
use clap::Shell;
@@ -12,12 +13,15 @@ use clap::Shell;
mod app;
fn main() {
fs::create_dir_all(env!("OUT_DIR")).unwrap();
let outdir = match env::var_os("OUT_DIR") {
None => return,
Some(outdir) => outdir,
};
fs::create_dir_all(&outdir).unwrap();
let mut app = app::app_short();
app.gen_completions("rg", Shell::Bash, env!("OUT_DIR"));
app.gen_completions("rg", Shell::Fish, env!("OUT_DIR"));
// Zsh seems to fail with a panic.
// app.gen_completions("rg", Shell::Zsh, env!("OUT_DIR"));
app.gen_completions("rg", Shell::PowerShell, env!("OUT_DIR"));
app.gen_completions("rg", Shell::Bash, &outdir);
app.gen_completions("rg", Shell::Fish, &outdir);
app.gen_completions("rg", Shell::Zsh, &outdir);
app.gen_completions("rg", Shell::PowerShell, &outdir);
}

View File

@@ -16,11 +16,11 @@ mk_tarball() {
local out_dir=$(pwd)
local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}"
mkdir "$td/$name"
mkdir "$td/$name/complete"
cp target/$TARGET/release/rg "$td/$name/"
cp {doc/rg.1,README.md,UNLICENSE,COPYING,LICENSE-MIT} "$td/$name/"
cp target/release/build/ripgrep-*/out/rg.* "$td/$name/"
cp target/release/build/ripgrep-*/out/_rg.* "$td/$name/"
cp target/$TARGET/release/build/ripgrep-*/out/{_rg,rg.bash-completion,rg.fish,_rg.ps1} "$td/$name/complete/"
pushd $td
tar czf "$out_dir/$name.tar.gz" *

View File

@@ -1,6 +1,6 @@
use std::collections::HashMap;
use clap::{App, AppSettings, Arg};
use clap::{App, AppSettings, Arg, ArgSettings};
const ABOUT: &'static str = "
ripgrep (rg) recursively searches your current directory for a regex pattern.
@@ -74,6 +74,7 @@ fn app<F>(next_line_help: bool, doc: F) -> App<'static, 'static>
.arg(arg("path").multiple(true))
.arg(flag("regexp").short("e")
.takes_value(true).multiple(true).number_of_values(1)
.set(ArgSettings::AllowLeadingHyphen)
.value_name("pattern"))
.arg(flag("files")
// This should also conflict with `pattern`, but the first file

View File

@@ -1263,6 +1263,18 @@ fn regression_64() {
assert_eq!(lines, path("foo/abc\n"));
}
// See: https://github.com/BurntSushi/ripgrep/issues/270
#[test]
fn regression_270() {
let wd = WorkDir::new("regression_270");
wd.create("foo", "-test");
let mut cmd = wd.command();
cmd.arg("-e").arg("-test");
let lines: String = wd.stdout(&mut cmd);
assert_eq!(lines, path("foo:-test\n"));
}
#[test]
fn type_list() {
let wd = WorkDir::new("type_list");