From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5701 invoked from network); 9 Oct 1997 20:49:26 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 9 Oct 1997 20:49:26 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id QAA07505; Thu, 9 Oct 1997 16:42:16 -0400 (EDT) Resent-Date: Thu, 9 Oct 1997 16:41:47 -0400 (EDT) Message-ID: <19971009154142.34066@cs.ou.edu> Date: Thu, 9 Oct 1997 15:41:42 -0500 From: "Brandon C. George" To: gkoopman@wi.leidenuniv.nl Cc: zsh-users@math.gatech.edu Subject: Re: newbie questions References: <199710091132.HAA20755@artemis.wi.leidenuniv.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.85 In-Reply-To: <199710091132.HAA20755@artemis.wi.leidenuniv.nl>; from Guido Koopman on Thu, Oct 09, 1997 at 01:32:02PM +0200 Resent-Message-ID: <"xemZR2.0.3q1.A6KFq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1071 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Thu, Oct 09, 1997 at 01:32:02PM +0200, Guido Koopman wrote: > Hello, zsh fans. > > - Is there a way to have a functionor alias run before every > external command? I'd like the xterm titlebar reflect the > title of the currently running program, instead of just > 'zsh:$PWD'. I can show you what I have. > # Function executed by zsh when directory changed to put directory > # in xterm title. Also make sure it is set immediately when new > # xterm started. > if [ "$TERM" = "xterm" ] || [ "$TERM" = "dtterm" ]; then > echo -n "\e]2;$HOSTNAME:$PWD\007" > function precmd () { > echo -n "\e]2;$HOSTNAME:$PWD\007\e]1;$HOSTNAME\007" > } > fi Hopefully this was one of the things you were looking for. This also puts the command in the window title. I don't remember where I found this. It may be with the distribution. Brandon -- |\/\/\/| | | | (o)(o) +==========OOOO==========OOOO==========+ | Brandon George bcgeorge@ou.edu | | OU CS Department Systems Admin | | PGP key: http://cs.ou.edu/~bcgeorge | +======================================+