| line |
true |
false |
branch |
|
82
|
0 |
250 |
unless /(\w+)([\=\:](.*))?/ |
|
85
|
184 |
66 |
$2 ? : |
|
89
|
0 |
41 |
if $_[0] and ref $_[0] |
|
92
|
123 |
0 |
unless ref $k |
|
93
|
0 |
123 |
unless exists $ret{$k} |
|
97
|
0 |
250 |
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
|
15 |
0 |
if (exists $c->{$w}) |
|
151
|
0 |
0 |
if (@c == 1) |
|
156
|
0 |
0 |
if (@c > 1) |
|
181
|
0 |
0 |
$t eq 'f' ? : |
|
|
0 |
0 |
$t eq 's' ? : |
|
|
0 |
0 |
$t eq 'o' ? : |
|
|
0 |
0 |
$t eq 'i' ? : |
|
|
0 |
0 |
$t ? : |
|
187
|
0 |
0 |
if $eq eq ':' |
|
199
|
0 |
0 |
'HASH' eq ref $_[0] ? : |
|
|
0 |
0 |
'ARRAY' eq ref $_[0] ? : |
|
350
|
0 |
0 |
if (not $t) { } |
|
|
0 |
0 |
elsif (defined $readline::rl_completion_function) { } |
|
|
0 |
0 |
elsif (defined(my $attr = $t->Attribs)) { } |
|
351
|
0 |
0 |
if -t select() |
|
399
|
0 |
0 |
unless $root and $o->{'cmds'} != $root |
|
404
|
0 |
0 |
if exists $$root{$_->[0]} and $$root{$_->[0]}[1] eq $_->[1] |
|
412
|
0 |
8 |
if $root |
|
442
|
0 |
8 |
if $root |
|
538
|
7 |
25 |
unless $p{'path'} |
|
541
|
0 |
25 |
unless 'CODE' eq ref $p{'exec'} |
|
543
|
0 |
25 |
unless my $new = pop @w |
|
546
|
0 |
8 |
if ('ARRAY' eq ref $r->{$w}) |
|
553
|
8 |
17 |
if ($p{'opts'}) |
|
554
|
0 |
8 |
ref $p{'opts'} ? : |
|
558
|
0 |
16 |
if ref $op |
|
561
|
0 |
0 |
ref $opts[0] ? : |
|
|
0 |
16 |
$expecting ? : |
|
588
|
1 |
0 |
if ('HASH' eq ref $cmd) { } |
|
595
|
0 |
0 |
if @args |
|
628
|
1 |
8 |
if (not ref $v) { } |
|
|
8 |
0 |
elsif ('HASH' eq ref $v) { } |
|
643
|
7 |
1 |
unless my $f = $o->{'history_file'} |
|
644
|
1 |
0 |
unless -f $f |
|
648
|
0 |
0 |
if $@ |
|
650
|
0 |
0 |
if 'ARRAY' eq ref $hist and @$hist |
|
651
|
0 |
0 |
unless ref $d and ref $more and ref $d eq ref $more |
|
652
|
0 |
0 |
if 'HASH' eq ref $d |
|
653
|
0 |
0 |
if 'ARRAY' eq ref $d |
|
654
|
0 |
0 |
if 'SCALAR' eq ref $d |
|
660
|
0 |
0 |
unless my $f = $o->{'history_file'} |
|
664
|
0 |
0 |
eval {
do {
store([[@his], $o->{'history_more'}], $f)
}
} ? : |
|
685
|
0 |
0 |
if $o->{'history_data'} |
|
710
|
0 |
0 |
unless ref $cmd |
|
711
|
0 |
0 |
@args ? : |
|
|
0 |
0 |
if 'HASH' eq ref $cmd |
|
714
|
0 |
0 |
if $comp and $comp == \&Term::Shell::MultiCmd::_root_command_comp |
|
715
|
0 |
0 |
if $word =~ /^(\-\-?)(.*)/ |
|
716
|
0 |
0 |
if (@args and $args[-1] =~ /^\-\-?(.*)/) |
|
718
|
0 |
0 |
if @op |
|
719
|
0 |
0 |
unless $op |
|
721
|
0 |
0 |
if 'ARRAY' eq ref $cb or 'HASH' eq ref $cb |
|
722
|
0 |
0 |
if 'CODE' eq ref $cb |
|
724
|
0 |
0 |
if 'ARRAY' eq ref $comp or 'HASH' eq ref $comp |
|
725
|
0 |
0 |
if 'CODE' eq ref $comp |
|
732
|
0 |
0 |
$last ? : |
|
|
0 |
0 |
if $pre |
|
733
|
0 |
0 |
if 'ARRAY' eq ref $h |
|
737
|
0 |
0 |
$last ? : |
|
|
0 |
0 |
$pre ? : |
|
|
0 |
0 |
unless $c eq $dlm |
|
755
|
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'}) { } |
|
766
|
0 |
0 |
if exists $h->{$dlm} |
|
769
|
0 |
0 |
if $k eq $dlm |
|
779
|
0 |
0 |
if exists $h->{$dlm} |
|
782
|
0 |
0 |
if $k eq $dlm |
|
785
|
0 |
0 |
'ARRAY' eq ref $h->{$k} ? : |
|
797
|
0 |
0 |
unless ref $cmd |
|
798
|
0 |
0 |
if @args |
|
808
|
0 |
0 |
unless ref $cmd |
|
809
|
0 |
0 |
if 'HASH' eq ref $cmd |
|
819
|
0 |
0 |
unless $prolog |
|
820
|
0 |
0 |
if $par and not $line |
|
825
|
0 |
0 |
if $root |
|
837
|
0 |
0 |
unless @argv |
|
839
|
0 |
0 |
$o->{'root'} ? : |
|
|
0 |
0 |
if $argv[0] =~ /^\-\-?d/ |
|
840
|
0 |
0 |
if $argv[0] =~ /^\-\-?c/ |
|
841
|
0 |
0 |
unless ($argv[0] =~ /^\-\-?s/) |
|
845
|
0 |
0 |
if $root |
|
850
|
0 |
0 |
if (@argv) |
|
853
|
0 |
0 |
if $root |
|
854
|
0 |
0 |
unless ref $cmd |
|
855
|
0 |
0 |
if @args |
|
856
|
0 |
0 |
if 'ARRAY' eq ref $cmd |
|
858
|
0 |
0 |
if ($o->{'root'}) |
|
862
|
0 |
0 |
if ($cmd) |
|
870
|
8 |
0 |
unless my $p = $o->{'pager'} |
|
871
|
0 |
0 |
unless ref $p |
|
873
|
0 |
0 |
unless not $r or ref $r |
|
880
|
0 |
8 |
unless $cmd |
|
887
|
0 |
0 |
@a ? : |
|
|
0 |
0 |
if $c eq 'cd' and $o->{'root_cmd'} and not exists $r->{'cd'} |
|
892
|
0 |
8 |
if $o->{'help_cmd'} and $c eq 'ls' && !exists $r->{'ls'} || $c eq 'help' && !exists $r->{'help'} |
|
908
|
1 |
6 |
if 'CODE' eq ref $o->{'record_cmd'} |
|
910
|
0 |
7 |
unless my($cmd, $path, @args, $fh) = &_travel($o, $clt) |
|
913
|
0 |
7 |
if ($o->{'piper'} and $fh = $o->{'pager'}->()) |
|
921
|
0 |
7 |
if ($fh) |
|
929
|
0 |
7 |
unless ref $cmd |
|
930
|
0 |
1 |
if $o->{'empty_cmd'} and $cmd eq ($o->{'root'} || $o->{'cmds'}) and 0 == length join('', @args) |
|
931
|
0 |
7 |
if $cmd eq $o->{'cmds'} |
|
932
|
0 |
7 |
unless 'ARRAY' eq ref $cmd |
|
934
|
0 |
7 |
if $p{'_ERR_'} |
|
964
|
0 |
0 |
if defined $pos |
|
991
|
0 |
0 |
if 'CODE' eq ref $p |
|
992
|
0 |
0 |
if $p =~ /\W$/ |
|
993
|
0 |
0 |
if $o->{'root_path'} |
|
1010
|
0 |
0 |
unless $o->{'term'} |
|
1011
|
0 |
0 |
'ARRAY' eq ref $_ ? : |
|
|
0 |
0 |
if @_ |