# NOTE: Derived from lib/Zoidberg/Fish/Commands.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package Zoidberg::Fish::Commands;

#line 721 "lib/Zoidberg/Fish/Commands.pm (autosplit into blib/lib/auto/Zoidberg/Fish/Commands/jobs.al)"
# ############ #
# Job routines #
# ############ #


sub jobs {
	my $self = shift;
	my ($opts, $args) = getopt 'list,l pgids,p @', @_;
	$args = @$args 
		? [ map {$$self{shell}->job_by_spec($_)} @$args ]
		: $$self{shell}->{jobs} ;
	if ($$opts{pgids}) {
		output [ map $$_{pgid}, @$args ];
	}
	else {
		output $_->status_string(undef, $$opts{list})
			for sort {$$a{id} <=> $$b{id}} @$args;
	}
}

# end of Zoidberg::Fish::Commands::jobs
1;
