Commits

Anonymous committed b1eea8e

add space to regex and make it mandatory

Comments (0)

Files changed (1)

 
 if ! tmux -L "$TITLE" list-sessions 2>/dev/null | 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