
I wrote previously a how-to to set your iTerm tab title.
I finally found a tool to do the same thing with the default Mac OS X Terminal.
Check it out here, it works perfectly for me! link is dead.
On my Mac OS X 10.6.6 and bash (3.2.48(1)-release), you can set your tab title with the PROMPT_COMMAND variable as follow:
export PROMPT_COMMAND=’echo -ne “\033]0;${USER}@${HOSTNAME%%.*}\007″‘
Add this to your .bashrc or /etc/profile file and you’re done
Comments (6)
I was happy to find this, but after installing, un-commenting the defaults in the conf file and running the command, my tabs haven’t changed. Something I’m doing wrong?
Which version of Mac OS are you running ?
The link is dead. Do you have an alternative?
link’s dead : (
I’ve updated my post.
Overriding PROMPT_COMMAND is a bad idea… OS X uses it to update internal directory/command variables it uses.
It can all be done via the PS1 variable anyway:
export PS1=’\e]0;\u@\h\a\W\$ ‘
Trackback/Pingback (1)
How can I display the file name in the tab of a VIM editor window?…
First, what do you mean by “tab of a vim editor window”? This could mean many different things. But I suspect it means: – Vim running in a terminal window (text mode only, not gvim) – The terminal is a GUI application that offers tabbed-navigation Fo…