summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2018-08-27 19:13:57 -0400
committerAndrew Gallant <jamslam@gmail.com>2018-08-27 21:21:37 -0400
commit8f978a3cf798b9652653f3bfc0eb637112070fca (patch)
tree2c7fdfae092fc3c5dc4b8d4c1a3349bec53f98ee /src
parent87b745454d34786029fab9c63402572c5195ac3d (diff)
doc: clarify and fix typo
Clarify that --byte-offset may be wrong if the source isn't being read directly. Also tweak the README a bit. And remove a damned Oxford comma.
Diffstat (limited to 'src')
-rw-r--r--src/app.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/app.rs b/src/app.rs
index 19306c2c..059effbd 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -685,9 +685,15 @@ fn flag_byte_offset(args: &mut Vec<RGArg>) {
const SHORT: &str =
"Print the 0-based byte offset for each matching line.";
const LONG: &str = long!("\
-Print the 0-based byte offset within the input file
-before each line of output. If -o (--only-matching) is
-specified, print the offset of the matching part itself.
+Print the 0-based byte offset within the input file before each line of output.
+If -o (--only-matching) is specified, print the offset of the matching part
+itself.
+
+If ripgrep does transcoding, then the byte offset is in terms of the the result
+of transcoding and not the original data. This applies similarly to another
+transformation on the source, such as decompression or a --pre filter. Note
+that when the PCRE2 regex engine is used, then UTF-8 transcoding is done by
+default.
");
let arg = RGArg::switch("byte-offset").short("b")
.help(SHORT).long_help(LONG);