Using Terminal 6.1.2, everything up-to-date.
I currently have the following in my .bashrc
, as suggested in this answer:
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# Show the currently running command in the terminal title:
# http://www.davidpashley.com/articles/xterm-titles-with-bash.html
show_command_in_title_bar()
{
case "$BASH_COMMAND" in
*\033]0*)
# The command is trying to set the title bar as well;
# this is most likely the execution of $PROMPT_COMMAND.
# In any case nested escapes confuse the terminal, so don't
# output them.
;;
*)
echo -ne "\033]0;${USER}@${HOSTNAME}: ${BASH_COMMAND}\007"
;;
esac
}
trap show_command_in_title_bar DEBUG
;;
*)
;;
esac
It changes the window title to the currently running process, which is great. However, it doesn't change the tab title. So if I have multiple tabs open in the same directory, they all have the same title, and I can't immediately see which program is running in which tab.
Is there a way to make this apply to the tab titles as well?
Please let me know if there's a better forum for this; I'm not sure if it's an elementary Terminal thing, or a bash thing, or what.