--- /dev/null
+#! /usr/bin/perl
+use strict;
+use warnings;
+my $file;
+while (<STDIN>) {
+ if (/^[^+-]/) {
+ $file=$_;
+ next;
+ }
+ my $match;
+ for my $arg (@ARGV) {
+ $match=1 if /\Q$arg\E/;
+ }
+ next if !$match;
+ if (defined $file) {
+ print $file;
+ $file=undef;
+ }
+ print;
+}