Disallowing windows to rename themselves in tmux

tmuxzsh

I've installed tmux on an OS X system with zsh provided by oh-my-zsh.

I usually use quite a number of tmux windows for a whole bunch of ssh sessions, and I like to keep these windows named after the hosts I'm working with so it makes it much easier for me to figure out which window contains what.

I've tried adding configuration lines like set-window-option -g automatic-rename off and set-option -g allow-rename off to my ~/.tmux.conf, however if I start a new tmux session, rename the window and cd into a different directory tmux happily renames the window again to match the current working directory.

How can I name windows without them changing on me automatically?

Best Answer

I had similar problem but with byobu-screen and after some research, it turned out that it is oh-my-zsh feature.

This has been discussed on oh-my-zsh issues page

In short, I had to uncomment DISABLE_AUTO_TITLE="true" line in my ~/.zshrc file.

Based on the version of oh-my-zsh, you may have to add export DISABLE_AUTO_TITLE="true".