From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20600 invoked from network); 25 Mar 1999 21:41:16 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Mar 1999 21:41:16 -0000 Received: (qmail 11358 invoked by alias); 25 Mar 1999 21:40:12 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2243 Received: (qmail 11338 invoked from network); 25 Mar 1999 21:40:09 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14074.44342.516079.381173@hatchet.fc.hp.com> Date: Thu, 25 Mar 1999 14:40:06 -0700 (MST) From: Matthew Lovell To: Ryan Tennant Cc: "'zsh-users@sunsite.auc.dk'" Subject: Re: Updating the Xterm title with every execution? In-Reply-To: <81F7033862B6D211A6160000D11C16370838C7@trc-tpaexch01.trcinc.com> References: <81F7033862B6D211A6160000D11C16370838C7@trc-tpaexch01.trcinc.com> X-Mailer: VM 6.70 under 20.4 "Emerald" XEmacs Lucid On 25 March 1999, 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. This certainly isn't a general solution to your problem, but I do change the terminal title for some commands (and take care to restore it upon others). function print_banner { print -n "\e]0;$1\a" } function chpwd() { banner="$(print -Pn '%n@%m - %55<...<%~')" print_banner "$banner" } function vi { print_banner $1; =vi $1; chpwd } function su { =su $*; chpwd } function zsh { =zsh $*; chpwd } function rlogin { =rlogin $*; chpwd } function rcmd { =rcmd $*; chpwd } -- Matthew Lovell voice: (970) 898-6264 Hewlett-Packard WSL fax: (970) 898-2510 3404 E. Harmony Rd. MS A0 location: 3UQ4 Fort Collins, CO 80528-9599 mailto:lovell@fc.hp.com