2

I have a variable as below (all commands in this post issued in a shell bash/zsh):

var="test.abc"
tmux new-window -n ${var}-windows

in the new created window I issue this command:

var="test.abc"
tmux send-keys -t$var-windows "echo dafsd" Enter

I got the error: can't find pane: abc-windows

I try another command: tmux send-keys -t test\.abc-windows "echo dafsd" Enter, got the same error as above: can't find pane: abc-windows

tm list-windows does show as below:

2: test.abc-windows* (1 panes) [416x117] [layout 5154,416x117,0,0,15] @12 (active)

meaning test.abc-windows is created as expected but I can't seem to send-keys to it event with literal name test.abc-windows / test\.abc-windows

The same issue when I try to create new session name that contains dot as below:

var="test.abc"
tmux new-session -d -s $var-session -n $var-session

I got below error:

bad session name: test.abc-session

This time, session is not created (contrast to above that test.abc-windows is created)

Howto create new tmux session/windows that contain dot properly?

1 Answer 1

3

Session names cannot contain either . or :.

You can create window names with them but you won't be able to use them in targets so I don't recommend it. You can still target the window using the window index (eg :3) or window ID (eg @2).

1
  • Guess I have to convert . to _ to name with tmux. Commented Jan 8, 2020 at 6:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.