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