From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1634 invoked from network); 2 Sep 2007 18:00:35 -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.5 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; 2 Sep 2007 18:00:35 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 12417 invoked from network); 2 Sep 2007 18:00:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Sep 2007 18:00:28 -0000 Received: (qmail 12581 invoked by alias); 2 Sep 2007 18:00:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11801 Received: (qmail 12572 invoked from network); 2 Sep 2007 18:00:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Sep 2007 18:00:19 -0000 Received: (qmail 11268 invoked from network); 2 Sep 2007 18:00:19 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 2 Sep 2007 18:00:12 -0000 Received: from torch.brasslantern.com ([71.116.91.65]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JNR0024T5ZUBB10@vms044.mailsrvcs.net> for zsh-users@sunsite.dk; Sun, 02 Sep 2007 12:59:56 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id l82HxroO022917 for ; Sun, 02 Sep 2007 10:59:54 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id l82HxrB0022916 for zsh-users@sunsite.dk; Sun, 02 Sep 2007 10:59:53 -0700 Date: Sun, 02 Sep 2007 10:59:53 -0700 From: Bart Schaefer Subject: Re: fg jobs info In-reply-to: <20070902154306.35880.qmail@smasher.org> To: zsh-users@sunsite.dk Message-id: <070902105953.ZM22915@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20070902154306.35880.qmail@smasher.org> Comments: In reply to Atom Smasher "fg jobs info" (Sep 3, 3:43am) On Sep 3, 3:43am, Atom Smasher wrote: } } why i want this: i've tweaked my ~/.zshrc file to fill in the tabs of } mrxvt (and the windowlist in screen) with the current command name (and } some other goodies, i'll post the rc file if there's interest). ie; i can } quickly find the 'emacs somefile' tab (or screen) because the tab (or } screen) says "emacs somefile". cool. but if i suspend the command, then } bring it back with 'fg', the tab (or screen) now says "fg". not cool. Have a look at the variables jobdirs, jobtexts, and jobstates in the zsh/parameter module. Or there's a lazier way out: } 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 fg() { # Obviously this needs error handling added, etc. typeset -g fgjob=$(jobs $*) builtin fg $* } and then stuff the title bar (or whatever) with the something parsed out of $fgjob.