Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: newbie questions
- X-seq: zsh-users 1071
- From: "Brandon C. George" <bcgeorge@xxxxxxxxxxxxxxxxx>
- To: gkoopman@xxxxxxxxxxxxxxxx
- Subject: Re: newbie questions
- Date: Thu, 9 Oct 1997 15:41:42 -0500
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <199710091132.HAA20755@xxxxxxxxxxxxxxxxxxxxxxxx>; from Guido Koopman on Thu, Oct 09, 1997 at 01:32:02PM +0200
- References: <199710091132.HAA20755@xxxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxx |
| OU CS Department Systems Admin |
| PGP key: http://cs.ou.edu/~bcgeorge |
+======================================+
Messages sorted by:
Reverse Date,
Date,
Thread,
Author