From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19963 invoked from network); 25 Mar 1999 20:42:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Mar 1999 20:42:56 -0000 Received: (qmail 24990 invoked by alias); 25 Mar 1999 20:23:32 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2241 Received: (qmail 24950 invoked from network); 25 Mar 1999 20:23:28 -0000 Message-ID: <81F7033862B6D211A6160000D11C16370838C7@trc-tpaexch01.trcinc.com> From: Ryan Tennant To: "'zsh-users@sunsite.auc.dk'" Subject: Updating the Xterm title with every execution? Date: Thu, 25 Mar 1999 15:15:25 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" 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. A script to display what I'm interested in doing is below. script name: hi #!/bin/zsh echo '\033]; '$*'\007' # Displays command in xterm title after script name (i.e hi ls -la, would display ls -la) trap "trap '' 2" 2 $* # Executes commands I enter after the script name trap "" 2 echo '\033]; '${HOSTNAME}: IDLE'\007' # Displays idle xterm title i want to do line 1 after i hit enter before execution of $*. I want to reset the title bar in the event that I hit ctrl-c (traps). I want to do line 6 after execution of the commands. obviously the functionality of this script is limited in the fact that it doesnt parse beyond "|"s or other delimeters. essentially, i'm looking for someone more gifted than myself to aid in my quest. thanks. ryan tennant