Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Updating the Xterm title with every execution?
- X-seq: zsh-users 2243
- From: Matthew Lovell <lovell@xxxxxxxxx>
- To: Ryan Tennant <rtennant@xxxxxxxxxx>
- Subject: Re: Updating the Xterm title with every execution?
- Date: Thu, 25 Mar 1999 14:40:06 -0700 (MST)
- Cc: "'zsh-users@xxxxxxxxxxxxxx'" <zsh-users@xxxxxxxxxxxxxx>
- In-reply-to: <81F7033862B6D211A6160000D11C16370838C7@xxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <81F7033862B6D211A6160000D11C16370838C7@xxxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author