title: bash: change tab title when command is run
body: <p>I want to change the tab title in iTerm2 if a specific command is run. Specifically, when the <code>runserver</code> command from django is run, I would like the tab to show 'runserver' in the title.</p>
  
  <p>I've been experimenting with bash escape codes, but I can't find something to do this. I have seen <code>trap</code> brought up in similar questions, but I can't find great documentation on how to do something like what I want.</p>
  
  <p>iTerm2 also has 'triggers' in preferences that checks for regex matches, but I can't get the 'command' portion to execute. I.e. catching the string 'Starting development server at' via regex and running the command <code>echo test</code> does not do anything.</p>