zsh-users
 help / color / mirror / code / Atom feed
From: "Brandon C. George" <bcgeorge@bachman.cs.ou.edu>
To: gkoopman@wi.leidenuniv.nl
Cc: zsh-users@math.gatech.edu
Subject: Re: newbie questions
Date: Thu, 9 Oct 1997 15:41:42 -0500	[thread overview]
Message-ID: <19971009154142.34066@cs.ou.edu> (raw)
In-Reply-To: <199710091132.HAA20755@artemis.wi.leidenuniv.nl>; from Guido Koopman on Thu, Oct 09, 1997 at 01:32:02PM +0200

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 |
+======================================+


      parent reply	other threads:[~1997-10-09 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-09 11:32 Guido Koopman
1997-10-09 14:07 ` Peter Stephenson
1997-10-09 20:41 ` Brandon C. George [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19971009154142.34066@cs.ou.edu \
    --to=bcgeorge@bachman.cs.ou.edu \
    --cc=gkoopman@wi.leidenuniv.nl \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).