doc: note how to escape a '$' in --replace

Fixes #1524
This commit is contained in:
Andrew Gallant
2020-05-08 08:32:20 -04:00
parent 17dcc2bf51
commit 50840ea43b
2 changed files with 4 additions and 0 deletions

View File

@@ -2,6 +2,8 @@ TBD
=== ===
Bug fixes: 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): * [BUG #1537](https://github.com/BurntSushi/ripgrep/issues/1537):
Fix match bug caused by inner literal optimization. Fix match bug caused by inner literal optimization.
* [BUG #1571](https://github.com/BurntSushi/ripgrep/issues/1571): * [BUG #1571](https://github.com/BurntSushi/ripgrep/issues/1571):

View File

@@ -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 indices will be replaced by expanded shell variables which will most likely
be empty. be empty.
To write a literal '$', use '$$'.
Note that the replacement by default replaces each match, and NOT the entire 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. line. To replace the entire line, you should match the entire line.