title: How to automatically rename tmux windows to the current directory
body: <p>I would like to have tmux to automatically rename the window with the current working directory (cwd). As it is by default, it names the tab/window as the name of the current process, such as zsh or vim.</p>
  
  <p>When I open a new window in tmux, the name is <code>reattach-to-use-namespace</code> and then it immediately switches to <code>zsh</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/wezdj.png" alt="tmux tabs"></p>
  
  <p>I'm on OS X 10.10.2, I use zshell, and I have tmux 1.9a.</p>
  
  <p>To be clear, I don't want the entire path in the name of the window, just the current directory, so for example, I want <code>projectName</code>, not <code>/Users/username/Development/projectName</code>.</p>
  
  <p>If you want to see my current <code>tmux.conf</code>, <a href="https://github.com/aharris88/dotfiles/blob/b7128b10b038229c564f48a4280096a856aa650b/tmux.conf" rel="noreferrer">here it is</a>.</p>