This is a .bashrc example to use xttitle. 

Thanks to Chris Lawrence <lawrencc@debian.org> who provided it:

While the man page gives a (slightly erroneous, due to nroff mangling)
example, it might be useful to provide some example code for .bashrc.
Here's an extract from my .bashrc:

# begin example .bashrc
update_title()
{
     [ $TERM = "xterm" ] && xttitle "[$$] ${USER}@${HOSTNAME}:$PWD"
}

function cd()
{
     builtin cd $*; update_title
}

function ssh()
{
     /usr/bin/ssh $*; update_title
}

# If running interactively, then:
if [ "$PS1" ]; then
    update_title
fi
# end example .bashrc

These settings seem to keep my title reasonably updated and don't
interfere with scp/rsync.

