Skip to content

Instantly share code, notes, and snippets.

@Toady00
Created September 23, 2012 06:35
Show Gist options
  • Save Toady00/3769106 to your computer and use it in GitHub Desktop.
Save Toady00/3769106 to your computer and use it in GitHub Desktop.
Bash function to rename OS X Terminal windows and tabs
# Add this to your .bash_profile, or where ever you prefer.
function tname {
printf "\e]1;$1\a"
}
function wname {
printf "\e]2;$1\a"
}
# Now you can easily name your tabs or windows with the following:
# Rename tab
tname "Funky Tab"
# Rename window
wname "Funky Window"
Taken from Jamie Hill's blog at http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/ who in turn got the idea from "bubu" and Chris Page at http://superuser.com/questions/223308/name-terminal-tabs#answer-223314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment