Skip to content

Commit

Permalink
Make sure totals are also shown with --count-only / --verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 10, 2022
1 parent 5f10bd8 commit db7baa3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/App/Rak.rakumod
Expand Up @@ -1995,16 +1995,13 @@ my sub move-result-options-to-rak(--> Nil) {
%rak<eager> := True;
%rak<mapper> := -> $io, @matches --> Empty {
LAST {
if @files == 0 {
sayer "No files with matches";
}
elsif $verbose {
if $verbose {
sayer "$_.key() has $_.value() match{"es" if .value > 1}"
for @files;
}
else {
sayer "@files.map(*.value).sum() matches in @files.elems() files";
}
sayer @files
?? "@files.map(*.value).sum() matches in @files.elems() files"
!! "No files with matches";
}
@files.push: Pair.new: stringify($io), @matches.elems;
}
Expand Down

0 comments on commit db7baa3

Please sign in to comment.