From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4077 invoked from network); 2 Sep 2007 15:43:31 -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; 2 Sep 2007 15:43:31 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 37170 invoked from network); 2 Sep 2007 15:43:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Sep 2007 15:43:23 -0000 Received: (qmail 25221 invoked by alias); 2 Sep 2007 15:43:14 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11800 Received: (qmail 25212 invoked from network); 2 Sep 2007 15:43:13 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Sep 2007 15:43:13 -0000 Received: (qmail 35913 invoked from network); 2 Sep 2007 15:43:13 -0000 Received: from atom.smasher.org (69.55.237.145) by a.mx.sunsite.dk with SMTP; 2 Sep 2007 15:43:08 -0000 Received: (qmail 35881 invoked by uid 1000); 2 Sep 2007 15:43:06 -0000 Message-ID: <20070902154306.35880.qmail@smasher.org> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Date: Mon, 3 Sep 2007 03:43:05 +1200 (NZST) From: Atom Smasher MIME-Version: 1.0 OpenPGP: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt Subject: fg jobs info To: zsh-users@sunsite.dk X-POM: The Moon is Waning Gibbous (67% of Full) X-Hashcash: 1:20:0709021543:zsh-users@sunsite.dk::/Q9tS5n5vHbLaMxl:0000000000000 000000000000000000000000DvcX hypothetical example.... % jobs [1] suspended sleep 30 [2] suspended sleep 31 [3] suspended sleep 32 [4] suspended sleep 33 [5] - suspended sleep 34 [6] + suspended sleep 35 now, if i run 'fg' or 'fg %n', how can i make the command name (sleep xx) available to the shell? 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. there are some hacks to get around this, but they're not pretty. i'm not sure if this can be done elegantly, without requesting a new feature that puts the ~real~ foreground command into an environment var, and/or a 4th argument to preexec. unless there's a way to simulate the fg command (ie; a "-n" dry run argument) i think the best way to handle this (ideally) would be a 4th argument to preexec that contains what fg is bringing to the foreground. any other thoughts? thanks... -- ...atom ________________________ http://atom.smasher.org/ 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808 ------------------------------------------------- "Do not wait; the time will never be 'just right.' Start where you stand, and work with whatever tools you may have at your command, and better tools will be found as you go along." -- Napoleon Hill