In tmux command mode, the following creates new window and opens vim inside:
:new-window vim
When you quit vim, the window is also closed. Is there a way to make it stay?
In tmux command mode, the following creates new window and opens vim inside:
:new-window vim
When you quit vim, the window is also closed. Is there a way to make it stay?
I use send-keys so that it "types" the command into the shell. Here's my
get.all
script, which fires up many commands, some of which I may need to interact with after they're done (and the ones I don't, haveexit
):Moving good comment of @Jo So to a separate answer.
This command drops to shell once the first
ls -la
finishes:tmux new-window "/bin/sh -c 'ls -la; exec bash'"
I realise this is a long dead question. But I'm a recent user of tmux and I had this same question. It turns out that you might want to do this:
That gets you a bash window (login shell). Then, run whatever commands you want. When they're done, they return to a command prompt, like you expect. I think a lot of people are looking for an interactive 'screen'-like behaviour. This is an easy way to do that.
tmux
has an option for this:remain-on-exit
: