title: iTerm2 tab names change; what is this bash command?
body: <p>I use iTerm2 as my terminal on OS X. When I SSH into a machine, I like to name my tabs by going into the session preferences (<code>cmd + i</code>). Whenever I run another bash command after setting this preference, the tab title goes back to the default that it was when I first SSHd in.</p>
  
  <p>Browsing around for an answer, I <a href="https://stackoverflow.com/questions/8823103/how-does-this-script-for-naming-iterm-tabs-work">found this answer by Chad</a> that is working for me:</p>
  
  <pre><code>export PROMPT_COMMAND=''
  echo -e "\033];MY_NEW_TITLE\007"
  </code></pre>
  
  <p>I don't really understand the <code>PROMPT_COMMAND</code> line, though I tried looking it up.</p>
  
  <p><strong>Can someone explain this in simple terms?</strong></p>
  
  <p><strong>Same question for the 2nd line, as I don't even know how to begin researching that.</strong></p>