[clug] Programmable title

Bryan Kilgallin bryan at netspeed.com.au
Fri Oct 17 08:26:30 MDT 2014


Now I want to remake in the same manner the bash shell window title. I 
think that the following section of the .bashrc file is involved.

# If this is an xterm set the title to user at host:dir
case "$TERM" in
xterm*|rxvt*)
     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
     ;;
*)
     ;;
esac

Again, what I want is as follows.
     if the tty is say "tty/7", then the window title should be...
         "bash terminal line 7
     whereas if the tty is say "pts/0", then the window title should be...
         "bash pseudo terminal line 0

-- 
www.netspeed.com.au/bryan/



More information about the linux mailing list