diff options
author | Balaji Sivaraman <balaji@balajisivaraman.com> | 2018-02-21 22:16:45 +0530 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-03-10 10:15:19 -0500 |
commit | b006943c01561a4ae5b928081d1bb4087b599e19 (patch) | |
tree | 88c402f4edc91b808260c9c7c9ea4e0a5790c089 /complete | |
parent | 91d0756f62790356012d692a7b340df92b54beac (diff) |
search: add -b/--byte-offset flag
This commit adds support for printing 0-based byte offset before each
line. We handle corner cases such as `-o/--only-matching` and
`-C/--context` as well.
Closes #812
Diffstat (limited to 'complete')
-rw-r--r-- | complete/_rg | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/complete/_rg b/complete/_rg index 6fecf6d8..0659c820 100644 --- a/complete/_rg +++ b/complete/_rg @@ -25,6 +25,7 @@ _rg() { '*--colors=[specify color settings and styles]: :->colorspec' '--column[show column numbers]' '(-A -B -C --after-context --before-context --context)'{-C+,--context=}'[specify lines to show before and after each match]:number of lines' + '(-b --byte-offset)'{-b,--byte-offset}'[print the 0-based byte offset for each matching line]' '--context-separator=[specify string used to separate non-continuous context lines in output]:separator' '(-c --count --passthrough --passthru)'{-c,--count}'[only show count of matches for each file]' '--debug[show debug messages]' |