Skip to content

Commit

Permalink
ripgrep: improve usage documentation
Browse files Browse the repository at this point in the history
This shows an example for reading stdin.

Fixes #951
  • Loading branch information
BurntSushi committed Jul 22, 2018
1 parent b9c922b commit 6771626
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions doc/rg.1.txt.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Synopsis

*rg* [_OPTIONS_] *--type-list*

*command* | *rg* [_OPTIONS_] _PATTERN_

*rg* [_OPTIONS_] *--help*

*rg* [_OPTIONS_] *--version*
Expand Down
3 changes: 2 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 6771626

Please sign in to comment.