aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-13 00:48:03 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-13 00:48:03 +0100
commit253171c7c71b6f89bb674c4adf8b45e17d5432fa (patch)
tree0452d116ed24861063a214c92884181d8a52bba8
parent4e3e4a41630f697193e060bd0cd96275e9b622ab (diff)
Document git-grab
-rw-r--r--grab.121
1 files changed, 21 insertions, 0 deletions
diff --git a/grab.1 b/grab.1
index 2972bda..8ee5b28 100644
--- a/grab.1
+++ b/grab.1
@@ -11,6 +11,12 @@
.Op Ar
.Nm
.Fl h
+.Pp
+.Nm "git grab"
+.Op Fl nz
+.Ar pattern
+.Nm "git grab"
+.Fl h
.Sh DESCRIPTION
The
.Nm
@@ -28,6 +34,20 @@ filters on the results.
For more details on the pattern syntax, see
.Sx Pattern Syntax .
.Pp
+The
+.Nm git-grab
+utility is identical to the
+.Nm
+utility in all ways except for two exceptions.
+The first is that files cannot be passed as command-line arguments,
+.Nm git-grab
+instead will read all the files specified by an invocation of
+.Xr git-ls-files 1 .
+Secondly, the
+.Fl f
+option is not available;
+its behavior is always assumed and cannot be disabled.
+.Pp
.Nm
will read from the files provided on the command-line.
If no files are provided, the standard input will be read instead.
@@ -137,6 +157,7 @@ Search for a pattern in multiple files without printing filenames:
.Pp
.Dl $ cat file1 file2 file3 | grab 'x/pattern/'
.Sh SEE ALSO
+.Xr git-ls-files 1 ,
.Xr grep 1
.Rs
.%A Rob Pike