From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20757 invoked from network); 25 Mar 1999 21:57:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Mar 1999 21:57:10 -0000 Received: (qmail 12726 invoked by alias); 25 Mar 1999 21:56:07 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2244 Received: (qmail 12713 invoked from network); 25 Mar 1999 21:56:03 -0000 Sender: gjb@cs.washington.edu To: Ryan Tennant Cc: "'zsh-users@sunsite.auc.dk'" Subject: Re: Updating the Xterm title with every execution? References: <81F7033862B6D211A6160000D11C16370838C7@trc-tpaexch01.trcinc.com> From: Greg Badros Date: 25 Mar 1999 13:55:44 -0800 In-Reply-To: Ryan Tennant's message of "Thu, 25 Mar 1999 15:15:25 -0500" Message-ID: X-Mailer: Gnus v5.6.45/XEmacs 20.4 - "Emerald" Ryan Tennant writes: > Hello. I am trying to update the Xterm title every time I execute an > application, script, etc. To do this, it would seem logical that I have to > process the commands I enter at the command line before executing them. Zsh > seems to offer some preprocessing functionality, but not so much that I can > ask it to preprocess command line information and then execute an arbitrary > command. You should take a look at my patch to zsh-3.0.5: http://www.cs.washington.edu/homes/gjb/patches/zsh-3.0.5-color-postprompt.README http://www.cs.washington.edu/homes/gjb/patches/zsh-3.0.5-color-postprompt.patch it adds a POSTPROMPT that lets zsh output an arbitrary prompt-like expression *after* reading a command (optionally delaying some configurable number of seconds). I use this with XTerm escape sequences to do exactly as you suggest (and in fact this was the motivating problem-- I just generalized it in case anyone else can think of other cool things to use it for). My Xterm titles reflect the name of the last command that ran for more than $PPTMOUT (=5) seconds. The patch also adds colorization (a la GNU color-ls) to the completion lists. (Also a run-time option). Enjoy! Greg J. Badros gjb@cs.washington.edu Seattle, WA USA http://www.cs.washington.edu/homes/gjb