mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-03 21:51:58 -07:00
Compare commits
7 Commits
ignore-0.1
...
0.5.0
Author | SHA1 | Date | |
---|---|---|---|
|
fd9870d668 | ||
|
a3a2708067 | ||
|
78847b65c8 | ||
|
e962eea1cc | ||
|
95bc678403 | ||
|
68af3bbdc4 | ||
|
70b6bdb104 |
62
CHANGELOG.md
62
CHANGELOG.md
@@ -1,3 +1,65 @@
|
|||||||
|
0.5.0 (2017-03-12)
|
||||||
|
==================
|
||||||
|
This is a new minor version release of ripgrep that includes one minor breaking
|
||||||
|
change, bug fixes and several new features including support for text encodings
|
||||||
|
other than UTF-8.
|
||||||
|
|
||||||
|
A notable accomplishment with respect to Rust is that ripgrep proper now only
|
||||||
|
contains a single `unsafe` use (for accessing the contents of a memory map).
|
||||||
|
|
||||||
|
The **breaking change** is:
|
||||||
|
|
||||||
|
* [FEATURE #380](https://github.com/BurntSushi/ripgrep/issues/380):
|
||||||
|
Line numbers are now hidden by default when ripgrep is printing to a tty
|
||||||
|
**and** the only thing searched is stdin.
|
||||||
|
|
||||||
|
Feature enhancements:
|
||||||
|
|
||||||
|
* Added or improved file type filtering for Ceylon, CSS, Elixir, HTML, log,
|
||||||
|
SASS, SVG, Twig
|
||||||
|
* [FEATURE #1](https://github.com/BurntSushi/ripgrep/issues/1):
|
||||||
|
Add support for additional text encodings, including automatic detection for
|
||||||
|
UTF-16 via BOM sniffing. Explicit text encoding support with the
|
||||||
|
`-E/--encoding` flag was also added for latin-1, GBK, EUC-JP
|
||||||
|
and Shift_JIS, among others. The full list can be found here:
|
||||||
|
https://encoding.spec.whatwg.org/#concept-encoding-get
|
||||||
|
* [FEATURE #129](https://github.com/BurntSushi/ripgrep/issues/129):
|
||||||
|
Add a new `-M/--max-columns` flag that omits lines longer than the given
|
||||||
|
number of bytes. (Disabled by default!)
|
||||||
|
* [FEATURE #369](https://github.com/BurntSushi/ripgrep/issues/369):
|
||||||
|
A new flag, `--max-filesize`, was added for limiting searches to files with
|
||||||
|
a maximum file size.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* [BUG #52](https://github.com/BurntSushi/ripgrep/issues/52),
|
||||||
|
[BUG #311](https://github.com/BurntSushi/ripgrep/issues/311):
|
||||||
|
Tweak how binary files are detected and handled. (We are slightly less
|
||||||
|
conservative and will no longer use memory without bound.)
|
||||||
|
* [BUG #326](https://github.com/BurntSushi/ripgrep/issues/326):
|
||||||
|
When --files flag is given, we should never attempt to parse positional
|
||||||
|
arguments as regexes.
|
||||||
|
* [BUG #327](https://github.com/BurntSushi/ripgrep/issues/327):
|
||||||
|
Permit the --heading flag to override the --no-heading flag.
|
||||||
|
* [BUG #340](https://github.com/BurntSushi/ripgrep/pull/340):
|
||||||
|
Clarify that the `-u/--unrestricted` flags are aliases.
|
||||||
|
* [BUG #343](https://github.com/BurntSushi/ripgrep/pull/343):
|
||||||
|
Global git ignore config should use `$HOME/.config/git/ignore` and not
|
||||||
|
`$HOME/git/ignore`.
|
||||||
|
* [BUG #345](https://github.com/BurntSushi/ripgrep/pull/345):
|
||||||
|
Clarify docs for `-g/--glob` flag.
|
||||||
|
* [BUG #381](https://github.com/BurntSushi/ripgrep/issues/381):
|
||||||
|
Add license files to each sub-crate.
|
||||||
|
* [BUG #383](https://github.com/BurntSushi/ripgrep/issues/383):
|
||||||
|
Use latest version of clap (for argv parsing).
|
||||||
|
* [BUG #392](https://github.com/BurntSushi/ripgrep/issues/391):
|
||||||
|
Fix translation of set globs (e.g., `{foo,bar,quux}`) to regexes.
|
||||||
|
* [BUG #401](https://github.com/BurntSushi/ripgrep/pull/401):
|
||||||
|
Add PowerShell completion file to Windows release.
|
||||||
|
* [BUG #405](https://github.com/BurntSushi/ripgrep/issues/405):
|
||||||
|
Fix bug when excluding absolute paths with the `-g/--glob` flag.
|
||||||
|
|
||||||
|
|
||||||
0.4.0
|
0.4.0
|
||||||
=====
|
=====
|
||||||
This is a new minor version release of ripgrep that includes a couple very
|
This is a new minor version release of ripgrep that includes a couple very
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ripgrep"
|
name = "ripgrep"
|
||||||
version = "0.4.0" #:version
|
version = "0.5.0" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Line oriented search tool using Rust's regex library. Combines the raw
|
Line oriented search tool using Rust's regex library. Combines the raw
|
||||||
|
@@ -13,6 +13,10 @@ downloads available for
|
|||||||
|
|
||||||
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||||
|
|
||||||
|
### CHANGELOG
|
||||||
|
|
||||||
|
Please see the [CHANGELOG](CHANGELOG.md) for a release history.
|
||||||
|
|
||||||
### Screenshot of search results
|
### Screenshot of search results
|
||||||
|
|
||||||
[](http://burntsushi.net/stuff/ripgrep1.png)
|
[](http://burntsushi.net/stuff/ripgrep1.png)
|
||||||
|
@@ -40,7 +40,6 @@ before_deploy:
|
|||||||
- cargo build --release
|
- cargo build --release
|
||||||
- mkdir staging
|
- mkdir staging
|
||||||
- copy target\release\rg.exe staging
|
- copy target\release\rg.exe staging
|
||||||
- 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 'rust-everywhere-v1.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 *
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
class RipgrepBin < Formula
|
class RipgrepBin < Formula
|
||||||
version '0.4.0'
|
version '0.5.0'
|
||||||
desc "Search tool like grep and The Silver Searcher."
|
desc "Search tool like grep and The Silver Searcher."
|
||||||
homepage "https://github.com/BurntSushi/ripgrep"
|
homepage "https://github.com/BurntSushi/ripgrep"
|
||||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
|
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
|
||||||
sha256 "6ac71251909227f8ef7eda27d3080c954843f3665b81e455362c90b2a9c4734a"
|
sha256 "efdc64456fc64910c2998b25c402aac2ff17caf1507e8bcca4584b429ef7f7ae"
|
||||||
|
|
||||||
conflicts_with "ripgrep"
|
conflicts_with "ripgrep"
|
||||||
|
|
||||||
|
@@ -68,12 +68,12 @@ fn app<F>(next_line_help: bool, doc: F) -> App<'static, 'static>
|
|||||||
// consistent with short/long views.
|
// consistent with short/long views.
|
||||||
.arg(arg("help-short").short("h"))
|
.arg(arg("help-short").short("h"))
|
||||||
.arg(flag("help"))
|
.arg(flag("help"))
|
||||||
.arg(flag("version").short("V"))
|
.arg(arg("ripgrep-version").long("version").short("V"))
|
||||||
// First, set up primary positional/flag arguments.
|
// First, set up primary positional/flag arguments.
|
||||||
.arg(arg("pattern")
|
.arg(arg("pattern")
|
||||||
.required_unless_one(&[
|
.required_unless_one(&[
|
||||||
"file", "files", "help-short", "help", "regexp", "type-list",
|
"file", "files", "help-short", "help", "regexp", "type-list",
|
||||||
"version",
|
"ripgrep-version",
|
||||||
]))
|
]))
|
||||||
.arg(arg("path").multiple(true))
|
.arg(arg("path").multiple(true))
|
||||||
.arg(flag("regexp").short("e")
|
.arg(flag("regexp").short("e")
|
||||||
@@ -206,7 +206,7 @@ lazy_static! {
|
|||||||
doc!(h, "help",
|
doc!(h, "help",
|
||||||
"Show verbose help output.",
|
"Show verbose help output.",
|
||||||
"When given, more details about flags are provided.");
|
"When given, more details about flags are provided.");
|
||||||
doc!(h, "version",
|
doc!(h, "ripgrep-version",
|
||||||
"Prints version information.");
|
"Prints version information.");
|
||||||
|
|
||||||
doc!(h, "pattern",
|
doc!(h, "pattern",
|
||||||
|
19
src/args.rs
19
src/args.rs
@@ -88,18 +88,23 @@ impl Args {
|
|||||||
///
|
///
|
||||||
/// Also, initialize a global logger.
|
/// Also, initialize a global logger.
|
||||||
pub fn parse() -> Result<Args> {
|
pub fn parse() -> Result<Args> {
|
||||||
let matches = app::app_short().get_matches();
|
use clap::ErrorKind::*;
|
||||||
|
|
||||||
|
let matches = match app::app_short().get_matches_safe() {
|
||||||
|
Ok(matches) => matches,
|
||||||
|
Err(clap::Error { kind: HelpDisplayed, .. }) => {
|
||||||
|
let _ = ::app::app_long().print_help();
|
||||||
|
println!("");
|
||||||
|
process::exit(0);
|
||||||
|
}
|
||||||
|
Err(err) => err.exit(),
|
||||||
|
};
|
||||||
if matches.is_present("help-short") {
|
if matches.is_present("help-short") {
|
||||||
let _ = ::app::app_short().print_help();
|
let _ = ::app::app_short().print_help();
|
||||||
println!("");
|
println!("");
|
||||||
process::exit(0);
|
process::exit(0);
|
||||||
}
|
}
|
||||||
if matches.is_present("help") {
|
if matches.is_present("ripgrep-version") {
|
||||||
let _ = ::app::app_long().print_help();
|
|
||||||
println!("");
|
|
||||||
process::exit(0);
|
|
||||||
}
|
|
||||||
if matches.is_present("version") {
|
|
||||||
println!("ripgrep {}", crate_version!());
|
println!("ripgrep {}", crate_version!());
|
||||||
process::exit(0);
|
process::exit(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user