moshが正常に接続した後、コマンド「tmux attach-t0-d」を実行したいと思います。
mosh経由で正常にログに記録したときに、tmuxを再接続するコマンドを自動的に呼び出すにはどうすればよいですか?
これは機能します:
mosh $REMOTE tmux attach # I didn't expect this to work
しかし、これらのどちらもしません:
mosh $REMOTE "tmux attach -d" # This should probably work
mosh $REMOTE tmux attach -d # This correctly interprets -d as a mosh option
更新: Chris Johnson が指摘しているように、「--」引数を使用してオプションの処理をオフにすると、コマンド全体がtmux
コマンドとしてリモート サーバーに送信されます。
mosh $REMOTE -- tmux attach -t 0 -d