Open artem-zinnatullin opened 6 years ago
-tt may be required as I was getting this running this from WSL (client)-> OSX (remote).
Pseudo-terminal will not be allocated because stdin is not a terminal.
adding -tt
to the ssh command in the 2.1.0 script gave me back the beautiful gradle colors.
Right, I also use -tt
in my version :)
:) Are you guys accepting PR's on the 2.1.X script?
Although, looks like some escape characters slip through and break my terminal session, for example git status
after running interactive Mainframer prints output with broken tabulation (everything is shifted to the right)
@bmc08gt have you noticed something like this?
I've been using with interactive mode for a while now (only -t in my case) with the old bash mainframer, haven't got any issue, another advantage is Ctrl+C being sent to the remote machine
@bmc08gt nope, 2.x is frozen, particularly this feature requires configuration options (not everyone might want it), so it's not just adding -tt
to ssh
call
@Pozzoooo Ctrl + C can be supported even in non-interactive mode in 3.x, but I'm still unsure if we need to, sometimes I want to keep remote machine doing what I started even if I stop Mainframer locally
for that case I would suggest "&" or Ctrl + Z.... it might be me, but I quite often remember I forgot to change something just after hitting enter to compile
Fair 👍
The caveat here is that in interactive mode, remote machine can start emitting escape symbols that slip through Mainframer and break Terminal state on local machine
I've had this with running Gradle, where local machine was macOS and remove was Linux.
The problem is described and discussed here: https://github.com/rust-lang-nursery/cli-wg/issues/57#issue-346366222
+1 for this enhancement.
I worked around to get nodejs run on the remote machine with mainframer
. And to enable colors, I locally added -t
+1 for this enhancement.
Problem:
Build tools like Gradle and Buck can output build progress much nicely if run in interactive mode, ie Gradle and Buck will show interactive progress of parallel build which is much easier to look at compared to plain build log.
Solution:
To enable that properly we can pass
-t
option tossh
which will try to allocate pseudo-terminal thus properly settingTERM
env variable so the command we're executing can detect interactive mode and react to that.I think that should be a config and flag option.
Note that some tools allow you manually override that, ie
gradle --console rich
, however particularly with Gradle output gets messed up and basically freezes if underlying ssh session is not interactive.I remember we discussed that internally, but can't remember why we decided to not add that option, @ming13 @dmitry-novikov do you remember details?