diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-07-04 17:42:35 +0200 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2019-07-04 11:42:35 -0400 |
commit | 8ebc113847926922bb85fb5a01c175319fb1e8d4 (patch) | |
tree | f4543d79ea12dcd09a3172c3d4349907513e0613 | |
parent | 785c1f176635fe617f012ed50369388359e26078 (diff) |
doc: improve docs for --replace flag
Specifically, we document shell-specific caveats related to the `--replace`
flag.
PR #1318
-rw-r--r-- | src/app.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2171,7 +2171,10 @@ Replace every match with the text given when printing results. Neither this flag nor any other ripgrep flag will modify your files. Capture group indices (e.g., $5) and names (e.g., $foo) are supported in the -replacement string. +replacement string. In shells such as Bash and zsh, you should wrap the +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. 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. |