briandfoy / PerlPowerTools

Perl Power Tools
https://metacpan.org/pod/PerlPowerTools
Other
211 stars 53 forks source link

grep: fix -Fc regression #634

Closed mknos closed 2 months ago

mknos commented 2 months ago
itsnicksia commented 2 months ago

This fixes an issue triggered on line 400 where line is still printed because only opt s is checked:

$opt->{'s'} || print $Mult && "$name:",
                $opt->{n} ? "$.:" : "", $_,
                ( $opt->{p} || $opt->{P} ) && ( '-' x 20 ) . "\n";
briandfoy commented 2 months ago

changes: set -s implicitly when -c is used