Commits

Anonymous committed 3ab8449

better window title checking

make sure channel #foobar doesn't stop channel #foo from showing up

Comments (0)

Files changed (1)

 
 if ! tmux -L "$TITLE" list-sessions | grep -q "^$TITLE"; then
 	tmux -L "$TITLE" new-session -d -s "$TITLE" -n "$(basename "$CPATH")" "srw -p \"$(basename "$CPATH")> \" cw_color.sh -i \"$OUT\" -o \"$IN\" -n \"$NICK\""
-elif ! tmux -L "$TITLE" list-windows -t "$TITLE" | grep -q "$(basename "$CPATH")"; then
+elif ! tmux -L "$TITLE" list-windows -t "$TITLE" | grep -q " $(basename "$CPATH") "; then
 	tmux -L "$TITLE" new-window -d -t "$TITLE" -n "$(basename "$CPATH")" "srw -p \"$(basename "$CPATH")> \" cw_color.sh -i \"$OUT\" -o \"$IN\" -n \"$NICK\""
 fi