I am trying to create a new window in a tmux-session and split it (and afterwards I hope that it'll be possible to execute some commands in the splitted window). Therefore, I'd like to use new-window
, which should, according to the manpage, support something like new-window 'vi /etc/passwd'
. Executing tmux new-window
in an existing session works fine.
Unfortunately, when I open tmux, and run tmux new-window 'tmux split-window'
or even tmux new-window 'echo test'
, the command is not executed at all. Other parameters, like tmux new-window -c "~"
work like expected. A little workaround, nameley using tmux new-window -t 4 && tmux split-window -t 4
does work, but requires an index.
Why is it not possible to split a pane or just give it an command to execute?