package Psh
::Strategy
::Auto_resume
;
If the input line matches the name of a stopped job
then brings that job to the foreground instead of starting
a new program with that name
@Psh::Strategy
::Auto_resume
::ISA
=('Psh::Strategy');
sub new
{ Psh
::Strategy
::new
(@_) }
return Psh
::Strategy
::CONSUME_TOKENS
;
if( my($index, $pid, $call)=
Psh
::Joblist
::find_last_with_name
($fnname,1))
return "auto-resume $call";
my ($index)= Psh
::Joblist
::find_last_with_name
($fnname,1);
Psh
::OS
::restart_job
(1,$index);
return qw(perlscript executable);