diff options
-rw-r--r-- | bin/guards.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/guards.in b/bin/guards.in index 9a5721b..2c175fa 100644 --- a/bin/guards.in +++ b/bin/guards.in @@ -89,8 +89,8 @@ sub parse($$) { # Command line options # -my ($dir, $config, $default, $check, $list, $invert_match) = - ( '', '-', 1, 0, 0, 0); +my ($dir, $config, $default, $check, $list, $invert_match, $with_guards) = + ( '', '-', 1, 0, 0, 0, 0); my @path; # Help text @@ -114,6 +114,7 @@ eval { 'c|config=s' => \$config, 'C|check' => \$check, 'l|list' => \$list, + 'w|with-guards' => \$with_guards, 'p|path=s' => \@path, 'D|default=i' => \$default, 'v|invert-match' => \$invert_match, @@ -178,6 +179,8 @@ if ($check) { } elsif ($list) { parse($fh, sub { my ($patch, @guards) = @_; + print join(' ', @guards), ' ' + if (@guards && $with_guards); print "$dir$patch\n"; }); } else { |