Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Updating the Xterm title with every execution?
- X-seq: zsh-users 2244
- From: Greg Badros <gjb@xxxxxxxxxxxxxxxxx>
- To: Ryan Tennant <rtennant@xxxxxxxxxx>
- Subject: Re: Updating the Xterm title with every execution?
- Date: 25 Mar 1999 13:55:44 -0800
- Cc: "'zsh-users@xxxxxxxxxxxxxx'" <zsh-users@xxxxxxxxxxxxxx>
- In-reply-to: Ryan Tennant's message of "Thu, 25 Mar 1999 15:15:25 -0500"
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <81F7033862B6D211A6160000D11C16370838C7@xxxxxxxxxxxxxxxxxxxxxxxx>
- Sender: gjb@xxxxxxxxxxxxxxxxx
Ryan Tennant <rtennant@xxxxxxxxxx> 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.
You should take a look at my patch to zsh-3.0.5:
http://www.cs.washington.edu/homes/gjb/patches/zsh-3.0.5-color-postprompt.README
http://www.cs.washington.edu/homes/gjb/patches/zsh-3.0.5-color-postprompt.patch
it adds a POSTPROMPT that lets zsh output an arbitrary prompt-like
expression *after* reading a command (optionally delaying some
configurable number of seconds). I use this with XTerm escape sequences
to do exactly as you suggest (and in fact this was the motivating
problem-- I just generalized it in case anyone else can think of other
cool things to use it for). My Xterm titles reflect the name of the
last command that ran for more than $PPTMOUT (=5) seconds.
The patch also adds colorization (a la GNU color-ls) to the completion
lists. (Also a run-time option).
Enjoy!
Greg J. Badros
gjb@xxxxxxxxxxxxxxxxx
Seattle, WA USA
http://www.cs.washington.edu/homes/gjb
Messages sorted by:
Reverse Date,
Date,
Thread,
Author