summaryrefslogtreecommitdiffstats
path: root/man/repo-grep.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/repo-grep.1')
-rw-r--r--man/repo-grep.1119
1 files changed, 119 insertions, 0 deletions
diff --git a/man/repo-grep.1 b/man/repo-grep.1
new file mode 100644
index 00000000..be410588
--- /dev/null
+++ b/man/repo-grep.1
@@ -0,0 +1,119 @@
1.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
2.TH REPO "1" "July 2021" "repo grep" "Repo Manual"
3.SH NAME
4repo \- repo grep - manual page for repo grep
5.SH SYNOPSIS
6.B repo
7\fI\,grep {pattern | -e pattern} \/\fR[\fI\,<project>\/\fR...]
8.SH DESCRIPTION
9Summary
10.PP
11Print lines matching a pattern
12.SH OPTIONS
13.TP
14\fB\-h\fR, \fB\-\-help\fR
15show this help message and exit
16.TP
17\fB\-j\fR JOBS, \fB\-\-jobs\fR=\fI\,JOBS\/\fR
18number of jobs to run in parallel (default: based on
19number of CPU cores)
20.SS Logging options:
21.TP
22\fB\-\-verbose\fR
23show all output
24.TP
25\fB\-q\fR, \fB\-\-quiet\fR
26only show errors
27.SS Sources:
28.TP
29\fB\-\-cached\fR
30Search the index, instead of the work tree
31.TP
32\fB\-r\fR TREEish, \fB\-\-revision\fR=\fI\,TREEish\/\fR
33Search TREEish, instead of the work tree
34.SS Pattern:
35.TP
36\fB\-e\fR PATTERN
37Pattern to search for
38.TP
39\fB\-i\fR, \fB\-\-ignore\-case\fR
40Ignore case differences
41.TP
42\fB\-a\fR, \fB\-\-text\fR
43Process binary files as if they were text
44.TP
45\fB\-I\fR
46Don't match the pattern in binary files
47.TP
48\fB\-w\fR, \fB\-\-word\-regexp\fR
49Match the pattern only at word boundaries
50.TP
51\fB\-v\fR, \fB\-\-invert\-match\fR
52Select non\-matching lines
53.TP
54\fB\-G\fR, \fB\-\-basic\-regexp\fR
55Use POSIX basic regexp for patterns (default)
56.TP
57\fB\-E\fR, \fB\-\-extended\-regexp\fR
58Use POSIX extended regexp for patterns
59.TP
60\fB\-F\fR, \fB\-\-fixed\-strings\fR
61Use fixed strings (not regexp) for pattern
62.SS Pattern Grouping:
63.TP
64\fB\-\-all\-match\fR
65Limit match to lines that have all patterns
66.TP
67\fB\-\-and\fR, \fB\-\-or\fR, \fB\-\-not\fR
68Boolean operators to combine patterns
69.TP
70\-(, \-)
71Boolean operator grouping
72.SS Output:
73.TP
74\fB\-n\fR
75Prefix the line number to matching lines
76.TP
77\fB\-C\fR CONTEXT
78Show CONTEXT lines around match
79.TP
80\fB\-B\fR CONTEXT
81Show CONTEXT lines before match
82.TP
83\fB\-A\fR CONTEXT
84Show CONTEXT lines after match
85.TP
86\fB\-l\fR, \fB\-\-name\-only\fR, \fB\-\-files\-with\-matches\fR
87Show only file names containing matching lines
88.TP
89\fB\-L\fR, \fB\-\-files\-without\-match\fR
90Show only file names not containing matching lines
91.PP
92Run `repo help grep` to view the detailed manual.
93.SH DETAILS
94.PP
95Search for the specified patterns in all project files.
96.PP
97Boolean Options
98.PP
99The following options can appear as often as necessary to express the pattern to
100locate:
101.HP
102\fB\-e\fR PATTERN
103.HP
104\fB\-\-and\fR, \fB\-\-or\fR, \fB\-\-not\fR, \-(, \-)
105.PP
106Further, the \fB\-r\fR/\-\-revision option may be specified multiple times in order to
107scan multiple trees. If the same file matches in more than one tree, only the
108first result is reported, prefixed by the revision name it was found under.
109.PP
110Examples
111.PP
112Look for a line that has '#define' and either 'MAX_PATH or 'PATH_MAX':
113.IP
114repo grep \fB\-e\fR '#define' \fB\-\-and\fR \-\e( \fB\-e\fR MAX_PATH \fB\-e\fR PATH_MAX \e)
115.PP
116Look for a line that has 'NODE' or 'Unexpected' in files that contain a line
117that matches both expressions:
118.IP
119repo grep \fB\-\-all\-match\fR \fB\-e\fR NODE \fB\-e\fR Unexpected