line |
true |
false |
branch |
82
|
0 |
231 |
unless /(\w+)([\=\:](.*))?/ |
85
|
179 |
52 |
$2 ? : |
89
|
0 |
34 |
if $_[0] and ref $_[0] |
92
|
95 |
0 |
unless ref $k |
93
|
0 |
95 |
unless exists $ret{$k} |
97
|
0 |
231 |
unless defined $v |
105
|
0 |
7 |
ref $p ? : |
111
|
0 |
7 |
if (@p and not eval {
do {
&GetOptions(\%p, @p)
}
}) |
132
|
63 |
0 |
if defined $_ |
145
|
14 |
1 |
if (exists $c->{$w}) |
151
|
0 |
1 |
if (@c == 1) |
156
|
0 |
1 |
if (@c > 1) |
170
|
8 |
0 |
if $o->{'enable_sh_pipe'} and not $o->{'piper'} |
182
|
0 |
0 |
$t eq 'f' ? : |
|
0 |
0 |
$t eq 's' ? : |
|
0 |
0 |
$t eq 'o' ? : |
|
0 |
0 |
$t eq 'i' ? : |
|
0 |
0 |
$t ? : |
188
|
0 |
0 |
if $eq eq ':' |
200
|
0 |
0 |
'HASH' eq ref $_[0] ? : |
|
0 |
0 |
'ARRAY' eq ref $_[0] ? : |
371
|
0 |
0 |
if (not $t) { } |
|
0 |
0 |
elsif (defined $readline::rl_completion_function) { } |
|
0 |
0 |
elsif (defined(my $attr = $t->Attribs)) { } |
372
|
0 |
0 |
if -t select() |
420
|
0 |
0 |
unless $root and $o->{'cmds'} != $root |
425
|
0 |
0 |
if exists $$root{$_->[0]} and $$root{$_->[0]}[1] eq $_->[1] |
433
|
0 |
8 |
if $root |
442
|
8 |
0 |
if $o->{'help_cmd'} |
447
|
8 |
0 |
if $o->{'quit_cmd'} |
462
|
1 |
7 |
if $o->{'root_cmd'} |
463
|
0 |
8 |
if $root |
559
|
0 |
25 |
unless $p{'path'} |
562
|
0 |
25 |
unless 'CODE' eq ref $p{'exec'} |
564
|
0 |
25 |
unless my $new = pop @w |
567
|
0 |
8 |
if ('ARRAY' eq ref $r->{$w}) |
574
|
8 |
17 |
if ($p{'opts'}) |
575
|
0 |
8 |
ref $p{'opts'} ? : |
579
|
0 |
16 |
if ref $op |
582
|
0 |
0 |
ref $opts[0] ? : |
|
0 |
16 |
$expecting ? : |
609
|
1 |
0 |
if ('HASH' eq ref $cmd) { } |
616
|
0 |
0 |
if @args |
649
|
1 |
8 |
if (not ref $v) { } |
|
8 |
0 |
elsif ('HASH' eq ref $v) { } |
664
|
7 |
1 |
unless my $f = $o->{'history_file'} |
665
|
1 |
0 |
unless -f $f |
669
|
0 |
0 |
if $@ |
671
|
0 |
0 |
if 'ARRAY' eq ref $hist and @$hist |
672
|
0 |
0 |
unless ref $d and ref $more and ref $d eq ref $more |
673
|
0 |
0 |
if 'HASH' eq ref $d |
674
|
0 |
0 |
if 'ARRAY' eq ref $d |
675
|
0 |
0 |
if 'SCALAR' eq ref $d |
681
|
0 |
0 |
unless my $f = $o->{'history_file'} |
685
|
0 |
0 |
eval {
do {
store([[@his], $o->{'history_more'}], $f)
}
} ? : |
706
|
0 |
0 |
if $o->{'history_data'} |
731
|
0 |
0 |
unless ref $cmd |
732
|
0 |
0 |
@args ? : |
|
0 |
0 |
if 'HASH' eq ref $cmd |
735
|
0 |
0 |
if $comp and $comp == \&Term::Shell::MultiCmd::_root_command_comp |
736
|
0 |
0 |
if $word =~ /^(\-\-?)(.*)/ |
737
|
0 |
0 |
if (@args and $args[-1] =~ /^\-\-?(.*)/) |
739
|
0 |
0 |
if @op |
740
|
0 |
0 |
unless $op |
742
|
0 |
0 |
if 'ARRAY' eq ref $cb or 'HASH' eq ref $cb |
743
|
0 |
0 |
if 'CODE' eq ref $cb |
745
|
0 |
0 |
if 'ARRAY' eq ref $comp or 'HASH' eq ref $comp |
746
|
0 |
0 |
if 'CODE' eq ref $comp |
753
|
0 |
0 |
$last ? : |
|
0 |
0 |
if $pre |
754
|
0 |
0 |
if 'ARRAY' eq ref $h |
758
|
0 |
0 |
$last ? : |
|
0 |
0 |
$pre ? : |
|
0 |
0 |
unless $c eq $dlm |
776
|
0 |
0 |
if ('ARRAY' eq ref $h) { } |
|
0 |
0 |
elsif ('HASH' ne ref $h) { } |
|
0 |
0 |
elsif ($p{'recursive'}) { } |
|
0 |
0 |
elsif ($p{'tree'}) { } |
|
0 |
0 |
elsif ($p{'full'}) { } |
787
|
0 |
0 |
if exists $h->{$dlm} |
790
|
0 |
0 |
if $k eq $dlm |
800
|
0 |
0 |
if exists $h->{$dlm} |
803
|
0 |
0 |
if $k eq $dlm |
806
|
0 |
0 |
'ARRAY' eq ref $h->{$k} ? : |
818
|
0 |
0 |
unless ref $cmd |
819
|
0 |
0 |
if @args |
829
|
0 |
0 |
unless ref $cmd |
830
|
0 |
0 |
if 'HASH' eq ref $cmd |
840
|
0 |
0 |
unless $prolog |
841
|
0 |
0 |
if $par and not $line |
846
|
0 |
0 |
if $root |
858
|
0 |
0 |
unless @argv |
860
|
0 |
0 |
$o->{'root'} ? : |
|
0 |
0 |
if $argv[0] =~ /^\-\-?d/ |
861
|
0 |
0 |
if $argv[0] =~ /^\-\-?c/ |
862
|
0 |
0 |
unless ($argv[0] =~ /^\-\-?s/) |
866
|
0 |
0 |
if $root |
871
|
0 |
0 |
if (@argv) |
874
|
0 |
0 |
if $root |
875
|
0 |
0 |
unless ref $cmd |
876
|
0 |
0 |
if @args |
877
|
0 |
0 |
if 'ARRAY' eq ref $cmd |
879
|
0 |
0 |
if ($o->{'root'}) |
883
|
0 |
0 |
if ($cmd) |
892
|
0 |
8 |
if ($c =~ s/$r//) |
902
|
8 |
0 |
unless my $p = $o->{'pager'} |
904
|
0 |
0 |
if ($r and not ref $r) |
908
|
0 |
0 |
if (not $r or $r and $c =~ s/$r//) |
911
|
0 |
0 |
unless ref $o->{'pager'} |
918
|
0 |
8 |
unless $cmd |
925
|
0 |
0 |
@a ? : |
|
0 |
0 |
if $c eq 'cd' and $o->{'root_cmd'} and not exists $r->{'cd'} |
930
|
0 |
8 |
if $o->{'help_cmd'} and $c eq 'ls' && !exists $r->{'ls'} || $c eq 'help' && !exists $r->{'help'} |
946
|
1 |
6 |
if 'CODE' eq ref $o->{'record_cmd'} |
948
|
0 |
7 |
unless my($cmd, $path, @args) = &_travel($o, $clt) |
952
|
0 |
7 |
if 'p' eq ($o->{'piper'} || '') |
953
|
0 |
7 |
if 'c' eq ($o->{'piper'} || '') and not $fh |
954
|
0 |
7 |
if ($fh) |
962
|
0 |
7 |
if ($fh) |
971
|
0 |
7 |
unless ref $cmd |
972
|
0 |
1 |
if $o->{'empty_cmd'} and $cmd eq ($o->{'root'} || $o->{'cmds'}) and 0 == length join('', @args) |
973
|
0 |
7 |
if $cmd eq $o->{'cmds'} |
974
|
0 |
0 |
if 'HASH' eq ref $cmd and length $o->{'query_cmd'} and exists $$cmd{$o->{'query_cmd'}} |
975
|
0 |
7 |
unless 'ARRAY' eq ref $cmd |
977
|
0 |
7 |
if $p{'_ERR_'} |
1007
|
0 |
0 |
if defined $pos |
1034
|
0 |
0 |
if 'CODE' eq ref $p |
1035
|
0 |
0 |
if $p =~ /\W$/ |
1036
|
0 |
0 |
if $o->{'root_path'} |
1053
|
0 |
0 |
unless $o->{'term'} |
1054
|
0 |
0 |
'ARRAY' eq ref $_ ? : |
|
0 |
0 |
if @_ |