Skip to content

Instantly share code, notes, and snippets.

@tiwiz
Last active August 29, 2015 14:05
Show Gist options
  • Save tiwiz/bf7f28d3370946913f81 to your computer and use it in GitHub Desktop.
Save tiwiz/bf7f28d3370946913f81 to your computer and use it in GitHub Desktop.
Add name for the current tab of Terminal in Mac OS X

#Set a custom name for the current Tab on Mac OS X terminal alt text

Open your ~/.bash_profile file and add the following lines:

function tabname {
	printf "\e]1;$1\a"
}

Then, save the file and close the editor and invoke source ~/.bash_profileon a terminal window.

From now on, you can set a name to your tab simply using

tabname aSingleWordName

or

tabname "a multiple words name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment