Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: fg jobs info
- X-seq: zsh-users 11805
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: fg jobs info
- Date: Tue, 4 Sep 2007 23:16:29 +1200 (NZST)
- In-reply-to: <070902105953.ZM22915@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <20070902154306.35880.qmail@xxxxxxxxxxx> <070902105953.ZM22915@xxxxxxxxxxxxxxxxxxxxxx>
On Sun, 2 Sep 2007, Bart Schaefer wrote:
Have a look at the variables jobdirs, jobtexts, and jobstates in the
zsh/parameter module. Or there's a lazier way out:
=============
that seems reasonably elegant... as long as a) there's only one suspended
job or b) jobs are only referred to by number :(
if the there's more than one job and either 1) the current job is implied
or 2) a job is specified not by job number, things get messy.
} unless there's a way to simulate the fg command (ie; a "-n" dry run
} argument)
The "jobs" command should accept all the same job-identifier patterns
as "fg", and in recent zsh "jobs" doesn't lose track of the job list
when run in a subshell, so you can do things like
==============
that doesn't seem to work in 4.3.2. i'm using versions as old as 4.2.1 so
the foo=$(jobs) trick won't work all around, and it's hackish enough that
it fails to inspire an upgrade.
also, here's a case where (given what i'm trying to do) i'm confident that
anything would fail (at least partially), short of some non-trivial
updates to zsh:
% man sh
^Z
% man zsh
^Z
% jobs
[1] - suspended man sh
[2] + suspended man zsh
% fg %1 %2
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"The lie can be maintained only for such time as the State can
shield the people from the political, economic and/or military
consequences of the lie. It thus becomes vitally important for
the State to use all of its powers to repress dissent, for the
truth is the mortal enemy of the lie, and thus by extension,
the truth becomes the greatest enemy of the State."
-- Josef Goebbels
Messages sorted by:
Reverse Date,
Date,
Thread,
Author