From 253171c7c71b6f89bb674c4adf8b45e17d5432fa Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 13 Jan 2024 00:48:03 +0100 Subject: Document git-grab --- grab.1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 -- cgit v1.2.3