In metaconfig.git, the branch master has been updated <http://perl5.git.perl.org/metaconfig.git/commitdiff/c727362a64c8ecfc36baddac876791220fb8d4e4?hp=aac777b18e16f6657543a1abd5d966b7fc57eeac>
- Log ----------------------------------------------------------------- commit c727362a64c8ecfc36baddac876791220fb8d4e4 Author: Aaron Crane <a...@cpan.org> Date: Fri Apr 22 13:44:46 2016 +0100 [UTIL] New metagrep -F option Does fixed-string matching, like grep -F. ----------------------------------------------------------------------- Summary of changes: bin/metagrep | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/metagrep b/bin/metagrep index 277e725..b9d0707 100755 --- a/bin/metagrep +++ b/bin/metagrep @@ -6,15 +6,18 @@ use warnings; use Getopt::Long qw(:config bundling nopermute passthrough); my $opt_l = 0; my $opt_w = 0; +my $opt_F = 0; GetOptions ( "w|word!" => \$opt_w, "l|list!" => \$opt_l, - ) or die "usage: metagrep [-w] [-l] pattern\n"; + "F|fixed!" => \$opt_F, + ) or die "usage: metagrep [-w] [-l] [-F] pattern\n"; use Cwd qw(getcwd abs_path); use File::Find; my $pat = shift or die "usage: metagrep pattern\n"; +$opt_F and $pat = quotemeta $pat; $opt_w and $pat = "\\b$pat\\b"; $pat = qr/$pat/i; -- perl5 metaconfig repository