From 55682e36920e2ab7633fc6eee11466d3faed0bf8 Mon Sep 17 00:00:00 2001 From: Shahin Sorkh Date: Mon, 8 Nov 2021 18:02:09 +0330 Subject: feat(tmux): set session name with `ZSH_TMUX_DEFAULT_SESSION_NAME` (#9063) --- plugins/tmux/tmux.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/tmux/tmux.plugin.zsh') diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index e52443a71..0ea3aa02a 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -76,7 +76,11 @@ function _zsh_tmux_plugin_run() { elif [[ -e "$ZSH_TMUX_CONFIG" ]]; then tmux_cmd+=(-f "$ZSH_TMUX_CONFIG") fi - $tmux_cmd new-session + if [[ -n "$ZSH_TMUX_DEFAULT_SESSION_NAME" ]]; then + $tmux_cmd new-session -s $ZSH_TMUX_DEFAULT_SESSION_NAME + else + $tmux_cmd new-session + fi fi if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then -- cgit v1.2.3-70-g09d2