I'm currently setting tmux to update the window title to the name of the currently running command by doing the following:
set-option -g set-titles on set-option -g set-titles-string '#S:#I.#P #W' # window number,program name,active (or not) set-window-option -g automatic-rename on # auto name
However, when no command is being executed, it just displays "N:zsh" (where N is the window number).
Is there a way to display the current last element of the path in the window title when no command is being executed? So, if the current path is /usr/src/linux, the window title should be "N:linux".