title: Tmux rename window to current directory
body: <p>So I have this function in my <code>.zshrc</code> to rename my current tmux window to the current directory.</p>
  
  <pre><code>precmd () {
      tmux set-window-option -qg window-status-format "#[fg=colour18 bg=colour18] | #[fg=white, bg=colour18] #I | ${PWD##/*/} #[fg=colour18, bg=colour18] | "
      tmux set-window-option -qg window-status-current-format "#[fg=colour18, bg=blue] | #[fg=white, bg=blue] #I | ${PWD##/*/} #[fg=blue, bg=colour18] | "
  }
  </code></pre>
  
  <p>And this works fine, but I'm wondering why the same code won't work in my <code>.tmux.conf</code></p>
  
  <pre><code># Status Bar
  set-window-option -qg window-status-format "#[fg=colour18 bg=colour18] | #[fg=white, bg=colour18] #I | ${PWD##/*/} #[fg=colour18, bg=colour18] | "
  
  set-window-option -qg window-status-current-format "#[fg=colour18, bg=blue] | #[fg=white, bg=blue] #I | ${PWD##/*/} #[fg=blue, bg=colour18] | "
  </code></pre>
  
  <p>If I try to use this, I get a error when I start up tmux.
  Any reason for this? Can I get the same effect using <code>#{pane_current_path}"</code> and shorten the path to just the current directory? </p>