From: Matthew Lovell <lovell@fc.hp.com>
To: Ryan Tennant <rtennant@trcinc.com>
Cc: "'zsh-users@sunsite.auc.dk'" <zsh-users@sunsite.auc.dk>
Subject: Re: Updating the Xterm title with every execution?
Date: Thu, 25 Mar 1999 14:40:06 -0700 (MST) [thread overview]
Message-ID: <14074.44342.516079.381173@hatchet.fc.hp.com> (raw)
In-Reply-To: <81F7033862B6D211A6160000D11C16370838C7@trc-tpaexch01.trcinc.com>
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@fc.hp.com
next prev parent reply other threads:[~1999-03-25 21:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-25 20:15 Ryan Tennant
1999-03-25 21:29 ` Larry P . Schrof
1999-03-25 21:40 ` Matthew Lovell [this message]
1999-03-25 21:55 ` Greg Badros
1999-03-25 22:09 ` Larry P . Schrof
1999-03-25 22:47 ` Greg Badros
1999-03-30 4:25 ` Bart Schaefer
1999-03-30 7:56 ` Andrej Borsenkow
1999-03-30 10:27 ` Greg Badros
1999-03-31 11:35 Sven Wischnowsky
1999-03-31 23:12 ` Greg Badros
1999-04-01 7:19 Sven Wischnowsky
1999-04-02 1:57 ` Greg Badros
1999-04-12 8:08 Sven Wischnowsky
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=14074.44342.516079.381173@hatchet.fc.hp.com \
--to=lovell@fc.hp.com \
--cc=rtennant@trcinc.com \
--cc=zsh-users@sunsite.auc.dk \
/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).