[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: preexec like behavior ? (feature request)
From: |
Chet Ramey |
Subject: |
Re: preexec like behavior ? (feature request) |
Date: |
Thu, 30 Oct 2003 08:21:24 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031027 |
> What do you mean with "using redirection to echo the right characters
to the appropriate
> window". Can you point me to the right direction ? I have not found
any way to do that
> for long-lived prozesses (eg. vim).
Sure. Let's assume that you're running this process in an xterm (or
equivalent) window.
I'm making the further assumption that you have a script or shell
function that will effect
changes to an xterm window's title bar. In case you don't, here's what
I use:
xtitle ()
{
echo -n -e "\033]0;$*\007"
}
So what you have to do is make sure these characters are directed to the
right window.
Find the tty device you want by using `ps' or equivalent. Say it's
something like /dev/ttyp4.
Run the command with the desired arguments and redirect the output to
/dev/ttyp4:
xtitle 'long-running vim window' > /dev/ttyp4
If you like, you can put the filename vim's editing in there, too.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu
http://tiswww.tis.cwru.edu/~chet/