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