'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() },
}
}
+ if (defined $opt{grep}) {
+ $_ ~~ qr/$opt{grep}/i or next LINE;
+ }
+
given ($opt{simplify} // 'none') {
when (['email', 'authors']) {
$header[1] =~ s{
=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,