From bc6defc875e9d21a422a33a3e68c512d5cd06320 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Thu, 16 Jan 2014 14:35:55 -0700 Subject: [PATCH] tmux plugin sets window-name to CWD --- plugins/tmux/tmux.plugin.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 626c41f3d..bc9437116 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -90,6 +90,17 @@ if which tmux &> /dev/null _zsh_tmux_plugin_run fi fi + + # Add window name support + function omz_tmux_windowname_precmd { + # ZSH_THEME_TERM_TAB_TITLE_IDLE is from lib/termsupport.zsh + if [[ "$DISABLE_AUTO_TITLE" == "true" ]] || [[ "$EMACS" == *term* ]]; then + return + fi + print -Pn "\033k$ZSH_THEME_TERM_TAB_TITLE_IDLE\033" + } + autoload -U add-zsh-hook + add-zsh-hook precmd omz_tmux_windowname_precmd else print "zsh tmux plugin: tmux not found. Please install tmux before using this plugin." fi