Skip to content

Commit

Permalink
doc: note how to escape a '$' in --replace
Browse files Browse the repository at this point in the history
Fixes #1524
  • Loading branch information
BurntSushi committed May 9, 2020
1 parent 17dcc2b commit 50840ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ TBD
===
Bug fixes:

* [BUG #1524](https://github.com/BurntSushi/ripgrep/issues/1524):
Note how to escape a `$` when using `--replace`.
* [BUG #1537](https://github.com/BurntSushi/ripgrep/issues/1537):
Fix match bug caused by inner literal optimization.
* [BUG #1571](https://github.com/BurntSushi/ripgrep/issues/1571):
Expand Down
2 changes: 2 additions & 0 deletions crates/core/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,8 @@ pattern in single quotes instead of double quotes. Otherwise, capture group
indices will be replaced by expanded shell variables which will most likely
be empty.
To write a literal '$', use '$$'.
Note that the replacement by default replaces each match, and NOT the entire
line. To replace the entire line, you should match the entire line.
Expand Down

0 comments on commit 50840ea

Please sign in to comment.