Skip to content

Commit 61ef96b

Browse files
committed
wip: when called --simulate, verbose by default has value 1
1 parent 4ef5eca commit 61ef96b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

bin/stow.in

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,22 @@ sub parse_options {
574574
GetOptionsFromArray(
575575
\@_,
576576
\%options,
577-
'verbose|v:+', 'help|h', 'simulate|n|no',
577+
'verbose|v:+', 'help|h',
578578
'version|V', 'compat|p', 'dir|d=s', 'target|t=s',
579579
'adopt', 'no-folding', 'dotfiles',
580580

581581
# clean and pre-compile any regex's at parse time
582+
'simulate|n|no' =>
583+
sub {
584+
my $regex = $_[1];
585+
push @{$options{simulate}}, qr($regex\z);
586+
587+
# TODO: if exists and less 1
588+
unless (exists $options{verbose}) {
589+
$options{verbose} = 1;
590+
}
591+
},
592+
582593
'ignore=s' =>
583594
sub {
584595
my $regex = $_[1];

0 commit comments

Comments
 (0)