When I fire up a new, detached tmux session using something like
tmux new-session -d -s "newname" 'python my file.py'
the tmux session seems to disappear from tmux ls once my python program has finished. I'd like to drop back into a shell. How do I do that?
Use send-keys to run your script in the default shell process in the new window.
tmux new-session -d -s "new name"
tmux send-keys -t "new name:0" "python my file.py" Enter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With