From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4148 invoked from network); 4 Sep 2007 11:16:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Sep 2007 11:16:54 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 58356 invoked from network); 4 Sep 2007 11:16:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Sep 2007 11:16:47 -0000 Received: (qmail 5986 invoked by alias); 4 Sep 2007 11:16:39 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11805 Received: (qmail 5977 invoked from network); 4 Sep 2007 11:16:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Sep 2007 11:16:38 -0000 Received: (qmail 57069 invoked from network); 4 Sep 2007 11:16:38 -0000 Received: from atom.smasher.org (69.55.237.145) by a.mx.sunsite.dk with SMTP; 4 Sep 2007 11:16:33 -0000 Received: (qmail 81487 invoked by uid 1000); 4 Sep 2007 11:16:31 -0000 Message-ID: <20070904111631.81486.qmail@smasher.org> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Date: Tue, 4 Sep 2007 23:16:29 +1200 (NZST) From: Atom Smasher In-Reply-To: <070902105953.ZM22915@torch.brasslantern.com> MIME-Version: 1.0 OpenPGP: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt References: <20070902154306.35880.qmail@smasher.org> <070902105953.ZM22915@torch.brasslantern.com> Subject: Re: fg jobs info To: zsh-users@sunsite.dk X-POM: The Moon is Waning Crescent (46% of Full) X-Hashcash: 1:20:0709041116:zsh-users@sunsite.dk::Xe2CshqPh8vh3gaN:0000000000000 0000000000000000000000003sSP 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