git.shiar.nl
/
git-grep-footer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4f6e72f
)
grep option
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 5 Feb 2011 02:16:24 +0000
(
03:16
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 5 Feb 2011 02:16:24 +0000
(
03:16
+0100)
git-grep-footer
patch
|
blob
|
history
diff --git
a/git-grep-footer
b/git-grep-footer
index b676ab8aef983e241ffb59921849d94075dd889d..c5d94400521c8bf56c06938762734ee68c8a28fd 100755
(executable)
--- a/
git-grep-footer
+++ b/
git-grep-footer
@@
-13,6
+13,7
@@
GetOptions(\my %opt,
'simplify|s:s',
'ignore-case|i!',
'fuzzy!',
'simplify|s:s',
'ignore-case|i!',
'fuzzy!',
+ 'grep|S=s',
'min|min-count|unique|u:i',
'max|max-count|show|n:i',
'version|V' => sub { Getopt::Long::VersionMessage() },
'min|min-count|unique|u:i',
'max|max-count|show|n:i',
'version|V' => sub { Getopt::Long::VersionMessage() },
@@
-75,6
+76,10
@@
while (readline) {
}
}
}
}
+ if (defined $opt{grep}) {
+ $_ ~~ qr/$opt{grep}/i or next LINE;
+ }
+
given ($opt{simplify} // 'none') {
when (['email', 'authors']) {
$header[1] =~ s{
given ($opt{simplify} // 'none') {
when (['email', 'authors']) {
$header[1] =~ s{
@@
-200,6
+205,11
@@
Values will be hidden entirely, so only attribute names remain.
=back
=back
+=item --grep=<pattern>
+
+Only include lines matching the specified regular expression.
+Case insensitivity can be disabled by prepending C<(?-i)>.
+
=item -u, --unique[=<threshold>]
Each match is only shown once,
=item -u, --unique[=<threshold>]
Each match is only shown once,