From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21057 invoked from network); 25 Mar 1999 22:14:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Mar 1999 22:14:51 -0000 Received: (qmail 14168 invoked by alias); 25 Mar 1999 22:13:37 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2245 Received: (qmail 14136 invoked from network); 25 Mar 1999 22:13:35 -0000 Date: Thu, 25 Mar 1999 16:09:56 -0600 From: "Larry P . Schrof" To: zsh-users@sunsite.auc.dk Subject: Re: Updating the Xterm title with every execution? Message-ID: <19990325160956.A26503@lyric.cig.mot.com> References: <81F7033862B6D211A6160000D11C16370838C7@trc-tpaexch01.trcinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: ; from Greg Badros on Thu, Mar 25, 1999 at 01:55:44PM -0800 The color in expansions is a cool idea, but I'm wondering what the first half of the patch can do that preexec can't? Thanks. - Larry On Thu, Mar 25, 1999 at 01:55:44PM -0800, Greg Badros wrote: > 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