Branch Coverage

blib/lib/Zoidberg/Fish/Commands.pm
Criterion Covered Total %
branch 32 214 14.9


line true false branch
63 0 0 if (@_ == 1 and $_[0] eq '-') { }
69 0 0 if (@$args)
70 0 0 if @$args > 1
74 0 0 if (%$opts)
75 0 0 if $$opts{'verbose'}
76 0 0 if (my($opt) = grep(/^[+-][^\d+lv]$/, @{$$opts{'_opts'};})) { }
0 0 elsif ($$opts{'list'}) { }
0 0 elsif (my($idx) = grep(/^[+-]\d+$/, @{$$opts{'_opts'};})) { }
80 0 0 if @$args
85 0 0 if @$args
86 0 0 if $idx < 1
93 0 0 if ($dir) { }
97 0 0 if $verbose
0 0 if ($done) { }
0 0 elsif (not $dir =~ m[^\.{0,2}/]) { }
100 0 0 unless $done = chdir path("$_/$dir")
107 0 0 if $verbose
111 0 0 unless ($done)
112 0 0 unless -d $dir
162 1 4 if ($$opt{'unexport'}) { }
0 4 elsif ($$opt{'print'}) { }
165 0 1 unless exists $ENV{$_}
166 0 1 if ($1 eq '@') { }
180 0 6 if ($1 eq '@') { }
182 0 0 defined *{$class . '::' . $_;}{'ARRAY'} ? :
0 0 defined $$vals{$_} ? :
183 0 0 if @env
187 2 3 defined ${$class . '::' . $_;} ? :
1 5 defined $$vals{$_} ? :
188 3 3 if defined $env
246 0 13 unless (@_)
254 2 11 if (%$opts)
257 1 1 if ($$opts{'-o'})
258 1 1 if ($$opts{'+o'})
261 9 2 defined $$vals{$_} ? :
264 9 4 if ($opt =~ m[/]) { }
266 0 9 unless $hash
310 0 2 if (not @_) { }
0 2 elsif (@_ == 1 and not ref $_[0] and not $_[0] =~ /^-|=/) { }
315 0 0 $1 ? :
324 0 0 if ($cmd =~ m[/]) { }
0 0 elsif (exists $$self{'shell'}{'aliases'}{$cmd}) { }
326 0 0 unless $hash
333 0 0 $1 ? :
339 0 2 unless @$keys
341 0 2 if (@$keys == keys %$val) { }
2 0 elsif (not keys %$val) { }
346 1 1 if ($cmd =~ m[/]) { }
348 0 1 unless $hash
364 0 0 if ($$opts{'all'}) { }
367 0 0 unless exists $$self{'shell'}{'aliases'}{$_}
398 0 0 if (not $$opts{'raw'}) { }
401 0 0 if ($1) { }
0 0 elsif (length $2) { }
406 0 0 unless $more
413 0 0 unless @$args
418 0 0 if (@words > @$args)
475 0 0 @Zoidberg::Fish::Commands::DIRSTACK ? :
488 0 0 unless $#Zoidberg::Fish::Commands::DIRSTACK
490 0 0 $#Zoidberg::Fish::Commands::DIRSTACK ? :
507 0 0 unless scalar @Zoidberg::Fish::Commands::DIRSTACK
543 0 0 if @$class > 1
548 0 0 unless ($$opts{'all'})
549 0 0 if /::/
550 0 0 unless /[a-z]/i
552 0 0 if defined ${$class . '::' . $_;}
553 0 0 if *{$class . '::' . $_;}{'ARRAY'}
554 0 0 if *{$class . '::' . $_;}{'HASH'}
555 0 0 if *{$class . '::' . $_;}{'CODE'}
556 0 0 if *{$class . '::' . $_;}{'IO'}
576 0 0 if ($file =~ m[/]) { }
583 0 0 if $@
595 0 0 unless (@_)
607 0 0 if ($topic eq 'about') { }
0 0 elsif ($topic eq 'command') { }
609 0 0 unless scalar @_
618 0 0 if ($info[0] eq 'alias') { }
0 0 elsif ($info[0] eq 'builtin') { }
0 0 elsif ($info[0] eq 'system') { }
0 0 elsif ($info[0] eq 'PERL') { }
621 0 0 if (@info == 1) { }
626 0 0 if (@info == 3) { }
657 0 0 if ($$opt{'module'}) { }
659 0 0 unless $cmd =~ /\.\w+$/
663 0 0 unless $info[0] eq 'system'
671 0 0 unless -e "$_/$cmd"
673 0 0 unless $$opt{'all'}
675 0 0 if (@matches) { }
683 0 0 if (exists $$self{'shell'}{'aliases'}{$cmd[0]} and not $$self{'shell'}{'aliases'}{$cmd[0]} =~ /^$cmd[0]\b/)
694 0 0 if (not $context or $context eq 'CMD') { }
695 0 0 unless exists $$self{'shell'}{'commands'}{$cmd[0]}
697 0 0 unless $tag
730 0 0 @$args ? :
732 0 0 if ($$opts{'pgids'}) { }
751 0 0 $id ? :
0 0 unless my $j = $$self{'shell'}->job_by_spec($id)
767 0 0 $id ? :
0 0 unless my $j = $$self{'shell'}->job_by_spec($id)
810 0 0 if ($$opts{'list'}) { }
811 0 0 if @{$$opts{'_opts'};} > 1
813 0 0 @$args ? :
817 0 0 unless @$args
820 0 0 if ($$opts{'_opts'})
822 0 0 unless $_
824 0 0 unless defined $sig
829 0 0 if (/^\%/) { }
830 0 0 unless my $j = $$self{'shell'}->job_by_spec($_)