None of the currently posted answers works/answers the question.
As per my original question, neither setting
PROMPT_COMMAND had any effect.
Using only a command at the command prompt, how do I change the title of the current terminal tab?
Many posts suggest this:
echo -en "\033]0;New terminal title\a"
but it does nothing.
None of the current answers works (some don't answer the question), so for clarity:
- Once the title is changed, I don't want it to change if I change directory etc
- I don't want the same title on all tabs. I only want to set the title for the tab I run the command in
- I want multiple tabs to each have different titles
PROMPT_COMMAND variable is not set in my terminal sessions. If I set it:
PROMPT_COMMAND='echo -en "\033]0;New terminal title\a"'
it has no effect.
What is the correct command?
FYI, the output of
uname -a is:
Linux d136172 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux