| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
=head1 NAME |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
dig - Greple module for recursive search |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
greple -Mdig pattern --dig directories ... |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
greple -Mdig pattern --git ... |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Option B<--dig> searches all files under specified directories. Since |
|
14
|
|
|
|
|
|
|
it takes all following arguments, place at the end of all options. |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
It is possible to specify AND condition after directories, in B |
|
17
|
|
|
|
|
|
|
option format. Next command will search all C source files under the |
|
18
|
|
|
|
|
|
|
current directory. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$ greple -Mdig pattern --dig . -name *.c |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$ greple -Mdig pattern --dig . ( -name *.c -o -name *.h ) |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
If more compilicated file filtering is required, combine with |
|
25
|
|
|
|
|
|
|
B<-Mselect> module. |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
You can use B<--dig> option without module declaration by setting it |
|
28
|
|
|
|
|
|
|
as autoload module in your F<~/.greplerc>. |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
autoload -Mdig --dig --git |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Use B<--git-r> to search submodules recursively. |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 OPTIONS |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over 7 |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item B<--dig> I I |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Specify at the end of B options, because all the rest is taken |
|
41
|
|
|
|
|
|
|
as option for L command. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item B<--git> I |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Search files under git control. Specify at the end of B |
|
46
|
|
|
|
|
|
|
options, because all the rest is taken as option for |
|
47
|
|
|
|
|
|
|
L command. |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item B<--git-r> I |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Short cut for B<--git --recurse-submodules>. |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=back |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
L |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
L |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L, L |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
package App::Greple::dig; |
|
66
|
1
|
|
|
1
|
|
1126
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
30
|
|
|
67
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
41
|
|
|
|
1
|
|
|
|
|
42
|
|
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__DATA__ |