diff options
author | Andrew Gallant <jamslam@gmail.com> | 2018-08-27 19:13:57 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-08-27 21:21:37 -0400 |
commit | 8f978a3cf798b9652653f3bfc0eb637112070fca (patch) | |
tree | 2c7fdfae092fc3c5dc4b8d4c1a3349bec53f98ee /src | |
parent | 87b745454d34786029fab9c63402572c5195ac3d (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.rs | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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); |