From 9f67636472ec476aec55d60af8d8e2fbcf98a0d8 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 14 Jan 2026 14:00:01 -0600 Subject: [PATCH] Fix tmux-session-init bug, more exact match for existing session names --- src_files/.local/scripts/tmux-session-init | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src_files/.local/scripts/tmux-session-init b/src_files/.local/scripts/tmux-session-init index 101c4df..5478b5f 100755 --- a/src_files/.local/scripts/tmux-session-init +++ b/src_files/.local/scripts/tmux-session-init @@ -31,11 +31,7 @@ fi [[ -z $tmux_target_name ]] && exit 0 -# TODO: bug in the check below, matches even when target name is a subset of an existing -# session's name, so a new session is not created in that case even though -# example: existing session with name 'dwm-suckless' will match at be opened even -# when attempting to open a new session with a target name of only 'dwm' -! (echo $tmux_existing_sessions | grep -q "$tmux_target_name") && +! (echo $tmux_existing_sessions | grep -q "^$tmux_target_name:") && tmux new-session -d -s $tmux_target_name -c $tmux_target_path && tmux_hydrate $tmux_target_name $tmux_target_path tmux_switch_to $tmux_target_name