Hi,<div><br></div><div>I've been enjoying using Mosh but I have a small issue with the $TERM variable. My use case is that I run Tmux locally, then inside that session I connect to another server with Mosh. Before, when I used SSH, my $TERM variable from inside Tmux ("screen-256color") would get forwarded to the remote host. I have my computers set up so that Tmux starts automatically if the $TERM variable does not start with "screen". With SSH, nothing would happen on the remote host, but with Mosh I'll get nested Tmux sessions because the remote host doesn't know it's already inside Tmux (it sees "xterm-256color").</div>
<div><br></div><div>I patched my copy of Mosh by removing the lines that set the $TERM variable, which make it just inherit the current one (diff attached). This works for me and I don't see a downside to it, but I also thought about adding a command line switch to override the $TERM variable if what I did isn't robust enough. If you tell me your thoughts on fixing it I'm happy to submit a pull request.</div>
<div><br></div><div>Thanks!</div><div>John</div>