ripgrep: improve usage documentation

This shows an example for reading stdin.

Fixes #951
This commit is contained in:
Andrew Gallant 2018-07-22 09:38:49 -04:00
parent b9c922be53
commit 6771626553
No known key found for this signature in database
GPG Key ID: B2E3A4923F8B0D44
3 changed files with 6 additions and 1 deletions

View File

@ -84,6 +84,8 @@ Bug fixes:
* [BUG #948](https://github.com/BurntSushi/ripgrep/issues/948):
ripgrep now uses an exit code of 2 to indicate an error, and uses an exit
code of 1 to indicate that no matches were found.
* [BUG #951](https://github.com/BurntSushi/ripgrep/issues/951):
Add stdin example to ripgrep usage documentation.
* [BUG #955](https://github.com/BurntSushi/ripgrep/issues/955):
Use buffered writing when not printing to a tty, which fixes a performance
regression.

View File

@ -18,6 +18,8 @@ Synopsis
*rg* [_OPTIONS_] *--type-list*
*command* | *rg* [_OPTIONS_] _PATTERN_
*rg* [_OPTIONS_] *--help*
*rg* [_OPTIONS_] *--version*

View File

@ -33,7 +33,8 @@ const USAGE: &str = "
rg [OPTIONS] PATTERN [PATH ...]
rg [OPTIONS] [-e PATTERN ...] [-f PATTERNFILE ...] [PATH ...]
rg [OPTIONS] --files [PATH ...]
rg [OPTIONS] --type-list";
rg [OPTIONS] --type-list
command | rg [OPTIONS] PATTERN";
const TEMPLATE: &str = "\
{bin} {version}