[Pdx-pm] solved: job control (still got a question)

Randall Hansen randall at sonofhans.net
Tue Jun 3 18:55:46 CDT 2003

Thus spoke "Michael R. Wolf" <MichaelRunningWolf at att.net>
( Tue, 03 Jun 2003 16:38:26 -0700 ):

> >    PROMPT_COMMAND="PS1=\$(jobs | ~/bin/prompt_me.pl)"

> Hey, foul! You lead us down (or we got faked down) a "do it in a
> subshell" mindset. Just kiddin', though I think we all thought some
> differnt, *normal*, calling sequence.

I think you got faked, but not by me.  My original question was how to
do this in Perl, and that "normal" method is still my preference.  Tom
Phoenix suggested the pipe in one of the early replies and it's a nice
solution -- and end-run around the problem.

> That's the only way I can think that this is working -- the command
> substitution is not creating a subshell for evaluating 'jobs'.

It's not even command substitition - the PROMPT_COMMAND line is in my
.bashrc :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20030603/f10b7f81/attachment.bin

More information about the Pdx-pm-list mailing list