in reply to Re: peg - Perl _expression_ (GNU) grep script
in thread peg - Perl _expression_ (GNU) grep script

To skip files beneath a directory, use -p with a suitable regex against the $File variable. eg
peg -p "$File !~ m#(^|/)(?:\.cvs|\.svn)/#" foobar
But you'll quickly tire of typing that, so add this to your PEG_OPTIONS in your "peg_ini.pl" file:
$ENV{'PEG_OPTIONS'} .= ' -p "$File !~ m#(^|/)(?:\.cvs|\.svn)/#" ';

Replies are listed 'Best First'.
Re^3: peg - Perl _expression_ (GNU) grep script
by Clarendon4 (Acolyte) on Jul 13, 2012 at 09:31 UTC
    This can now be done much more simply - just add:
    push @Exclude_dirs, ".svn", ".cvs";
    ... to one of the "peg_ini.pl" files.