From 57165ac5a535a152998f58e968b91a176e466d33 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 9 Feb 2023 16:55:39 +0000 Subject: [PATCH] Fix hook when not in TMUX --- ohmyzsh/hooks.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ohmyzsh/hooks.zsh b/ohmyzsh/hooks.zsh index 3f4ba5ce..f07413eb 100644 --- a/ohmyzsh/hooks.zsh +++ b/ohmyzsh/hooks.zsh @@ -1,5 +1,8 @@ tmux-window-name() { - ($TMUX_PLUGIN_MANAGER_PATH/tmux-window-name/scripts/rename_session_windows.py &) + if [[ -n $TMUX ]] + then + ($TMUX_PLUGIN_MANAGER_PATH/tmux-window-name/scripts/rename_session_windows.py &) + fi } add-zsh-hook chpwd tmux-window-name