summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordana <dana@dana.is>2017-08-09 05:53:35 -0500
committerAndrew Gallant <jamslam@gmail.com>2017-08-09 06:53:35 -0400
commit40bacbcd7ce3247cf778e52e9367e2d675e0f153 (patch)
tree9863dc3849fc2cd129df03f353342ec17434af5f /doc
parentb3a9c34515ec087bb7325db81f60ce26aeee3fd9 (diff)
Add -x/--line-regexp (#520)
add -x/--line-regexp flag
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/convert-to-man5
-rw-r--r--doc/rg.16
-rw-r--r--doc/rg.1.md4
3 files changed, 13 insertions, 2 deletions
diff --git a/doc/convert-to-man b/doc/convert-to-man
index 7afa441b..eeb252e2 100755
--- a/doc/convert-to-man
+++ b/doc/convert-to-man
@@ -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
diff --git a/doc/rg.1 b/doc/rg.1
index 1dc427b9..d09ad9c6 100644
--- a/doc/rg.1
+++ b/doc/rg.1
@@ -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[]
diff --git a/doc/rg.1.md b/doc/rg.1.md
index ffc44955..e18f2770 100644
--- a/doc/rg.1.md
+++ b/doc/rg.1.md
@@ -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*