Add -x/--line-regexp (#520)

add -x/--line-regexp flag
This commit is contained in:
dana
2017-08-09 05:53:35 -05:00
committed by Andrew Gallant
parent b3a9c34515
commit 40bacbcd7c
7 changed files with 48 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/sh -e
pandoc -s -t man rg.1.md -o rg.1
sed -i 's/\.TH.*/.TH "rg" "1"/g' rg.1
sed -i.bak 's/\.TH.*/.TH "rg" "1"/g' rg.1
rm -f rg.1.bak # BSD `sed` requires the creation of a back-up file

View File

@@ -156,6 +156,12 @@ Only show matches surrounded by word boundaries.
This is equivalent to putting \\b before and after the search pattern.
.RS
.RE
.TP
.B \-x, \-\-line\-regexp
Only show matches surrounded by line boundaries.
This is equivalent to putting ^...$ around the search pattern.
.RS
.RE
.SH LESS COMMON OPTIONS
.TP
.B \-A, \-\-after\-context \f[I]NUM\f[]

View File

@@ -105,6 +105,10 @@ Project home page: https://github.com/BurntSushi/ripgrep
: Only show matches surrounded by word boundaries. This is equivalent to
putting \\b before and after the search pattern.
-x, --line-regexp
: Only show matches surrounded by line boundaries. This is equivalent to
putting ^...$ around the search pattern.
# LESS COMMON OPTIONS
-A, --after-context *NUM*