aboutsummaryrefslogtreecommitdiff
path: root/man/grab.1
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-20 18:53:21 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-20 18:53:21 +0100
commit99a3838242604a4cc888ea7f5019207cfb1d003a (patch)
tree9a5df14659271c7b1337e70a3de565ce6b15eaf9 /man/grab.1
parent0d3d39996597fcb9b8728f933c6c96ac2a1a8ff3 (diff)
Add the -s/--strip-newline flag
Diffstat (limited to 'man/grab.1')
-rw-r--r--man/grab.120
1 files changed, 18 insertions, 2 deletions
diff --git a/man/grab.1 b/man/grab.1
index 9fd71f6..0997702 100644
--- a/man/grab.1
+++ b/man/grab.1
@@ -6,14 +6,16 @@
.Nd search for patterns in files
.Sh SYNOPSIS
.Nm
-.Op Fl cfnUz
+.Op Fl s | z
+.Op Fl cfnU
.Ar pattern
.Op Ar
.Nm
.Fl h
.Pp
.Nm "git grab"
-.Op Fl cnUz
+.Op Fl s | z
+.Op Fl cnU
.Ar pattern
.Op Ar glob ...
.Nm "git grab"
@@ -111,6 +113,16 @@ is not compiled with PCRE support.
See
.Sx CAVEATS
for more information.
+.It Fl s , Fl Fl strip\-newline
+Don’t print a newline at the end of a match if the match already ends in
+a newline.
+This can make output seem more
+.Sq natural ,
+as many matches will already have terminating newlines.
+.Pp
+This option is mutually exclusive with the
+.Fl z
+option.
.It Fl U , Fl Fl no\-unicode
Don’t use Unicode properties when matching \ed, \ew, etc.
Recognize only ASCII values instead.
@@ -130,6 +142,10 @@ If combined with the
option,
or if two or more files were provided as arguments,
filenames and matches will be separated by null bytes instead of colons.
+.Pp
+This option is mutually exclusive with the
+.Fl s
+option.
.El
.Ss Regular Expression Syntax
By default