Re: OT: jobname xterm title in bash?
On Sun, 18 Aug 2002, Lance Simmons wrote:
> I'd like to be able to use bash to dynamically print the current job
> name as the xterm title.
I don't know how to do that exactly but recent RH's put this in
/etc/bashrc:
if [ "$PS1" ]; then
if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
fi
case $TERM in
xterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
PS1="[\u@\h \W]\\$ "
..
..
..
The effect of the above is that the xterm title dynamically changes when
you change user or directory on the remote system to which you're logged
in, or, indeed, in any xterm. So may be what you what to do is possible
and maybe the above will get you started.
hth
Patrick
--
Patrick Wiseman pwiseman@mindspring.com
Linux user #17943 *Google First, Ask Later*
With 41 left to play, and up 20 in the loss column,
the Braves' Magic Number is 22!
Reply to: