当我使用类似的东西启动一个新的、分离的 tmux 会话时
tmux new-session -d -s "newname" 'python my file.py'
一旦我的 Python 程序完成,TMUX 会话似乎就会从tmux ls
中消失。我想回到壳里。我该怎么做?
使用send-keys
在新窗口中的默认 shell 进程中运行脚本。
tmux new-session -d -s "new name"
tmux send-keys -t "new name:0" "python my file.py" Enter