codebykat
5/10/2013 - 1:04 AM

add to ~/.bash_profile to set Terminal tabs to the name of file currently being edited in nano

add to ~/.bash_profile to set Terminal tabs to the name of file currently being edited in nano

# function to set the tab name in Terminal
function tabname {
  printf "\e]1;$1\a"
}

function nano {
  tabname $1 && /usr/bin/nano $1 && tabname "bash";
}